1
0
Fork 0
forked from OpenNeo/impress
impress/public/assets/pledgie-217dd44f6b1f6bca5977a0780158a304.js

1 line
No EOL
646 B
JavaScript

(function(){var e=$("meta[name=pledgie-campaign-id]").attr("content"),t="http://pledgie.com/campaigns/"+e+".json?callback=?";$.getJSON(t,function(e){var t=e.campaign,n=$("#campaign-donors");if(n.length){var r=n.children("ol"),i=t.pledges,s,o;for(var u in i)s=i[u],o=$("<li/>"),$("<strong/>",{text:s.display_name}).appendTo(o),$("<span/>",{text:s.date}).appendTo(o),o.appendTo(r);i.length>0&&n.addClass("has-donors")}$("span.campaign-raised").text(t.amount_raised),$("span.campaign-goal").text(t.goal);var a=t.amount_raised/t.goal*100;a>100&&(a=100),$("div.campaign-progress").css("width",a+"%"),$(document.body).addClass("campaign-loaded")})})();