I would like to know how to format #total to get rid of decimals. Actually, because of the /12, some of my numbers are like 1033.3340404995 and I would like them to be formatted "1000.33" (max 2 decimals).
Is there any easy way to do it ?
I'm not good in JS and dont understand how I can use the functions I found in this case (because #total isnt directly a variable...)
$("#sliderf").slider({
value: "0",
min: 0,
max: 2,
step: 1,
slide: function(event, ui) {
$("#pricef").val(s[ui.value]);
$("#amountf").val(r[ui.value]);
var aaa = $("#price").val();
var bbb = $("#priceb").val();
var ccc = $("#pricec").val();
var ddd = $("#priced").val();
var eee = $("#pricee").val();
var fff = $("#pricef").val();
$("#total").val(+aaa*Math.pow((1 + +bbb/100), +ccc/12) + +eee + +fff);
}