Jquery - Adding two numbers with decimal point gives wrong total
<p>I have the following Jquery function on change event on a textbox</p>

<pre><code>  $('input:text[id$=txtText1]').change(GetTotal);
</code></pre>

<p>This calls GetTotal function</p>

<pre><code> function GetTotal() {

            var value1 = txtText1.val();
            var value2 = txtText2.val();
                 var sum = add(value1, value2)

                 $('input:text[id$=txtSubTotals]').val(sum);
}
</code></pre>

<p>This is the add function</p>

<pre><code> function add() {
            var sum = 0;
            for (var i = 0, j = arguments.length; i &lt; j; i++) {
                if (IsNumeric(arguments[i])) {
                    sum += parseFloat(arguments[i]);
                }
            }
            return sum;
        }
</code></pre>

<p>In textbox 1 the value is 1.45 and in Textbox 2 it is 1.44 instead of getting 2.89. I am getting the following value 2.8899999999999997 </p>
