diff --git a/www/conservancy/static/supporter-page.js b/www/conservancy/static/supporter-page.js index 364da1b418c14451b811caf707f5fbe0571cc0bd..039707b1b07da32d2dc9f63c1d19508cb83f4059 100644 --- a/www/conservancy/static/supporter-page.js +++ b/www/conservancy/static/supporter-page.js @@ -14,7 +14,8 @@ $(document).ready(function() { var percentage = (parseFloat(noCommaSoFar) / parseFloat(noCommaGoal)) * 100; var curValue = 0.00; var incrementSoFar = 0.00; - var incrementDonationCount = 0; + var curDonationCount = 0; + var incrementDonationCount = Math.round( 0.01 * donationCount ); $('span#fundraiser-percentage').css({ 'color' : 'green', 'font-weight' : 'bold', @@ -36,11 +37,11 @@ $(document).ready(function() { } } function riseDonationCount() { - if (incrementDonationCount >= noCommaDonationCount) { + if (curDonationCount >= noCommaDonationCount) { $('span#fundraiser-donation-count').text(donationCount); } else { - $('span#fundraiser-donation-count').text(incrementDonationCount.toLocaleString()); - incrementDonationCount++; + $('span#fundraiser-donation-count').text(curDonationCount.toLocaleString()); + incrementDonationCount += incrementDonationCount; setTimeout(riseDonationCount, 50); } }