Possible Duplicate:
Display two decimal places, no rounding
I need to format the total result numbers in 2 decimal format. I am trying to achieve it without using jQuery plugin but just editing my following function:
function tally(selector) {
var total = 0;
$('p.editable_number').each(function() {
total += parseInt($(this).text()) || 0;
$('#subtotal').html(total)
$('#total').html(total*0.21);
$('#total1').html(total*1.21);
})
}
How this is possible modifying the VAR
? There are other ways to achieve it?
Here my case, as you can notice i dont get the total result formatted just with decimal separator