I'm using the autoNumeric jQuery plugin to place a dollar sign and a decimal into a a couple of text fields. Now I want to add these two values, but I'm getting the NAN error because of the dollar sign that is placed in front of the number.
How do I remove the dollar sign (first character), add the values and place the total value into another field?
Sample HTML
<input type="text" id="value_one" /><br />
<input type="text" id="value_two" /><br />
<input type="text" id="total_value" /><br />
Sample jQuery
$("body").hover(function() {
var a = +$('#value_one').val();
var b = +$('#value_two').val();
var total = a+b;
$('#total_value').val(total);
});