forked from OpenNeo/impress
cap campaign progress bar at 100 percent to avoid ugly overflows
This commit is contained in:
parent
ea4564569b
commit
b596ec4e5e
1 changed files with 1 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
||||||
$('span.campaign-goal').text(campaign.goal);
|
$('span.campaign-goal').text(campaign.goal);
|
||||||
|
|
||||||
var campaign_percent = campaign.amount_raised / campaign.goal * 100;
|
var campaign_percent = campaign.amount_raised / campaign.goal * 100;
|
||||||
|
if(campaign_percent > 100) campaign_percent = 100;
|
||||||
$('div.campaign-progress').css('width', campaign_percent + '%');
|
$('div.campaign-progress').css('width', campaign_percent + '%');
|
||||||
|
|
||||||
$(document.body).addClass('campaign-loaded');
|
$(document.body).addClass('campaign-loaded');
|
||||||
|
|
Loading…
Reference in a new issue