Link to home
Start Free TrialLog in
Avatar of swordfishsoup
swordfishsoup

asked on

jquery formating decimal places problem

Hi.
I'm using variables of prices and when using one on its own the formatting (decimal places) is fine like when I set the variable: var unitcore = (1*(unitcost)).toFixed(2);

but when I try and do a calculation I just can't get the formating back: trying this doesn't work: $("#tblunit").html(unitcore - disc).toFixed(2); and without the Fixed (2) doesn't work either.

Any ideas please clever people?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Steve Krile
Steve Krile
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial