decimal - Display trailing zero for price in jquery -
hopefully can this. looking add final 0 decimal part of price in price calculator written.
the calculator starts user selecting standard "sign up" fee of €25.50 , selecting other packages increase price.
at moment, standard price displays €25.5.
costs = jquery('.cost-container').text(); total = number(costs) + (25.50).tofixed(2);
i got code looking @ following similar query: how add trailing 0 price jquery
currently, if enter 25.511 value, result displays 25.51, shows code sort of working, issue when second decimal place 0 not display.
can spot wrong?
cheers
damien
try
costs = jquery('.cost-container').text(); total = ( number(costs) + 25.50 ).tofixed(2);
Comments
Post a Comment