Display trailing zero for price in jquery

Display trailing zero for price in jquery

Hey all,

Hopefully someone can help with this.  I am simply looking to add the final zero to the decimal part of a price in a price calculator I am written.  

The calculator starts with a user selecting a standard "Sign Up" fee of €25.50 and then selecting other packages to increase the price.

At the moment, the standard price displays as €25.5. 

  1.     costs = jQuery('.cost-container').text();
  2.     total = Number(costs) + (25.50).toFixed(2);


Currently, if I enter 25.511 as my value, the result displays as 25.51, which shows that the code is sort of working, my issue is just when the second decimal place is 0 that it does not display.

Can anybody spot what is wrong? 

Cheers

Damien