I have a few values:
var one = 1.0000 var two = 1.1000 var three = 1.1200 var four = 1.1230
and function:
function tofixed(
.toFixed(x) returns a string. Just parse it as a float again:
.toFixed(x)
return parseFloat(val.toFixed(2));
http://jsfiddle.net/mblase75/y5nEu/1/