title: JQuery sum all data in specific table row
body: <p>I have a table with inputs in each cell, except one (.total) which specifies the total of each table row.  When one of the inputs are changed I would like the sum to change for that row. Below is far as I have been able to get.
  <strong>The HTML:</strong></p>
  
  <pre><code>&lt;table&gt;
     &lt;tr&gt;
        &lt;td&gt;&lt;input value = "100"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input value = "100"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input value = "100"/&gt;&lt;/td&gt;
        &lt;td class="total"&gt;300&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;&lt;input value = "200"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input value = "200"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input value = "200"/&gt;&lt;/td&gt;
        &lt;td class="total"&gt;600&lt;/td&gt;
     &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>Now for the jQuery:</strong></p>
  
  <pre><code>    //add keyup handler
      $(document).ready(function(){
          $("input").each(function() {
              $(this).keyup(function(){
                  newSum();
              });
          });
      });
  
      function newSum() {
          var sum = 0;
          var thisRow = $(this).closest('tr');
  
          //iterate through each input and add to sum
          $(thisRow).("td:not(.total) input:text").each(function() {
                  sum += this.value;            
          });
  
          //change value of total
          $(thisRow).(".total").html(sum);
      }
  </code></pre>
  
  <p>Any help in finding out what I've done wrong will be greatly appreciated. Thanks!</p>