cap campaign progress bar at 100 percent to avoid ugly overflows

This commit is contained in:
Emi Matchu 2011-08-04 15:32:53 -04:00
parent ea4564569b
commit b596ec4e5e

View file

@ -30,6 +30,7 @@
$('span.campaign-goal').text(campaign.goal);
var campaign_percent = campaign.amount_raised / campaign.goal * 100;
if(campaign_percent > 100) campaign_percent = 100;
$('div.campaign-progress').css('width', campaign_percent + '%');
$(document.body).addClass('campaign-loaded');