Performing Arithmetic on Currency Values in the form of Text using Javascript
- by Abs
Hello all,
I am using JQuery to get the contents of a div, which only contains a price in dollars and I would like to add $99 to it, but its text, so when I do the below it won't work.
$('#price_' + part[0]).text($('#price_' + part[0]).text() + 99);
//Changes the div contents to $10099 - if it the contents was $100 to start with
So the question is how can I add the numeric values?
Thanks all