int to decimal jquery code example
Example 1: javascript convert string to 2 decimal
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
Example 2: jquery convert number to decimal
$(document).ready(function() {
$('.add').click(function() {
var value = parseFloat($('#total').text()) + parseFloat($(this).data('amount'))/100
$('#total').text( value.toFixed(2) );
});
})