Do number comparison, not string comparison, on pledge amounts

pull/1/head
eric 2012-05-14 14:05:40 -04:00
parent 3fe2800dfa
commit 6451e1adba
1 changed files with 2 additions and 2 deletions

View File

@ -10,8 +10,8 @@ $j().ready(function() {
$j('#premiums_list input').click(function() {
amount = $j(this).siblings('span.menu-item-price').html();
amount = amount.split('$')[1];
current = inputbox.val();
if (current<amount)
current = parseInt(inputbox.val());
if (current<parseInt(amount))
{inputbox.val(amount);}
});
});