Reputation: 950
I'm using the jQuery calculation and have just about everything working properly, but I need the total to display as 99.90, not 99.9 (for example).
So .toFixed()
isn't working for some reason when it should be! I can't find a mask that would work with this problem. Anyone have any other ideas?
Upvotes: 2
Views: 12799
Reputation: 2882
Instead of this line:
$(".sumit").sum("keyup", "#totalSum");
Use:
$('.sumit').keyup(function(){
var totalsum = $('.sumit').sum();
$('#totalSum').val(Number(totalsum).toFixed(2));
});
Hope that helps
Upvotes: 1