Javascript Won't Work or Execute
<p>I search all over but could get a good comparison on exactly why this Javascript calculating input fields was not functioning:</p>

<pre><code>&lt;script type="text/javascript"&gt;
  $(function() {
    $('input').each(function() {
      $(this).keyup(function() {
        calculateTotal($(this));
      });
    });
  });

  function calculateTotal(src) {
    var sum = 0;
    var sumtable = src.closest('.sumtable');

    sumtable.find('input').each(function() {
      if(!isNaN(this.value) &amp;&amp; this.value.length!=0) {
        sum += parseFloat(this.value);
      }
    });

    sumtable.find(".total").html(sum.toFixed(2));
  }
&lt;/script&gt;
&lt;table border="1" class="sumtable"&gt;
  &lt;tr&gt;
    &lt;td&gt;Amount 1&lt;/td&gt;
    &lt;td&gt;&lt;input class="amount" type="text"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Amount 2&lt;/td&gt;
    &lt;td&gt;&lt;input class="amount" type="text"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Amount 3&lt;/td&gt;
    &lt;td&gt;&lt;input class="amount" type="text"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Total Amount&lt;/td&gt;
    &lt;td&gt;&lt;span class="total"&gt;0&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;table border="1" class="sumtable"&gt;
  &lt;tr&gt;
    &lt;td&gt;Amount 1&lt;/td&gt;
    &lt;td&gt;&lt;input class="amount" type="text"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Amount 2&lt;/td&gt;
    &lt;td&gt;&lt;input class="amount" type="text"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Amount 3&lt;/td&gt;
    &lt;td&gt;&lt;input class="amount" type="text"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Total Amount&lt;/td&gt;
    &lt;td&gt;&lt;span class="total"&gt;0&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Let me know what I'm missing I called the var as previously stated but nothing happens when in a browser. </p>
