filling box with number, not string

pull/1/head
Andromeda Yelton 2012-05-14 20:37:29 -04:00
parent 6d14ba1c30
commit 50d9fcc6d6
1 changed files with 6 additions and 5 deletions

View File

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