How to add a trailing zero to a price with jQuery
Posted
by Nathan Pitman
on Stack Overflow
See other posts from Stack Overflow
or by Nathan Pitman
Published on 2010-03-12T13:52:39Z
Indexed on
2010/03/12
14:07 UTC
Read the original article
Hit count: 380
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 times I might have
258.2
In the later case I need to add the trailing zero with jQuery. How would I go about doing this?
© Stack Overflow or respective owner