I am having a problem displaying a price that is brought in from a PHP file by AJAX and then appended to the page via Javascript.
$('.cash1').text(parseFloat(prices[0]).toFixed(2));
This works fine until the returned value is in the thousands and contains a comma i.e. 1,123.34.
I would really like to keep the comma in the value if possible but so far the script will only return the value 1.34. I have tried using parseInt but this seems to fail in the same way.
Is this ok to you?