I have a code fast and quiet, but results in some calculations are formatted very large, including, the value obtained does not enter the calculation. How to do this see the right result?
I would like the result of the calculation (3 * 2215.40) was 3 646.20 and non 3.6450000000000005.
How?
Code - http://jsfiddle.net/bruno_aw/M7JZu/
$(".calc_cub").on("keyup", ".qtd", function(){
var valorCub = $("#CUB").text();
var number = parseFloat(valorCub);
var qtd = +$(this).val();
$(".total").text(number * qtd).val().toFixed(2);
});