So I have a script which returns a price for a product. However the price may or may not include trailing zeros so sometimes I might have:
258.22
and other t
Javascript has a function - toFixed - that should do what you want ... no JQuery needed.
var n = 258.2; n.toFixed (2); // returns 258.20