Unexpected result adding numbers: "79.0014.95", why?
<p>So I have a script that grabs a <code>&lt;tr&gt;</code> and iterates through it to get all the vars I need using jquery. One of those is a price, where the text of that td is 79.00 So I grab that and store it as var price. I now need to add that to another number that I decide, let's say 14.95. What I thought would work was</p>

<pre><code>var val1 = parseInt(price);
val1 = val1.toFixed(2);
var sub = val1 + 14.95;
</code></pre>

<p>but that outputs 79.0014.95 it's just concatenating them as if it were a string. Here's a the code I am using.</p>

<pre><code>$("#phrases tbody tr").live('click', function() {
            var nTds = $('td', this);
            var phrase = $(nTds[0]).text();
            var phrase_id = $(nTds[0]).attr("name");
            var searches = $(nTds[4]).text();
            var price = $(nTds[5]).text(); //is 79.00
            var val1 = parseInt(price);
            val1 = val1.toFixed(2);
            var val2 = 14.95;
            val2 = val2.toFixed(2);
            var sub = val1 + val2;
</code></pre>

<p>now when sub is output it is 79.0014.95. Any help would be greatly appreciated as this is driving me nuts. Thank you.</p>
