jquery not calculating sum as expected
<p>I started off by using this solution, but I can't seem to get it to work</p>

<p><a href="http://stackoverflow.com/questions/2417553/jquery-calculate-sum-of-values-in-all-text-fields">jQuery calculate sum of values in all text fields</a></p>

<p>Here is an example of my html</p>

<pre><code>&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr id="tr_affiliation_15159"&gt;
      &lt;td class="right col_aff_amount"&gt;15.00&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr id="tr_affiliation_15189"&gt;
      &lt;td class="right col_aff_amount"&gt;15.00&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;tfoot&gt;
    &lt;tr&gt;
      &lt;td class="total"&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tfoot&gt;
&lt;/table&gt;
</code></pre>

<p>This is my javascript function</p>

<pre><code>function removeRow(id) {
  $("#tr_affiliation_" + id).fadeOut("slow", function() {
    $("#tr_affiliation_" + id).remove();

    // recalc total
    var total = 0;

    $('.col_aff_amount').each(function() {
      // i have tried .text(), and .html() as well as .val() but it doesn't seem to make any difference
      var val = parseFloat($(this).val());
      console.log(val);
      total += val;
  });

  $("td.total").html(parseFloat(total).toFixed(2));

}
</code></pre>

<p>My console log just shows a long list of NaN, why can't it extract the number?</p>
