jQuery subtracting successive table cells
<p>I'm trying to determine how to calculate the difference between successive table cells in jQuery. I have a table that looks like this. </p>

<pre><code>&lt;table id ="tbl"&gt;
  &lt;tr&gt;
    &lt;td&gt;5&lt;/td&gt;
    &lt;td&gt;12&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
    &lt;td&gt;17&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;3&lt;/td&gt;
    &lt;td&gt;6&lt;/td&gt;
    &lt;td&gt;12&lt;/td&gt;
    &lt;td&gt;13&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>I'd like to subtract the first td from the second td (12 - 5), the third from the second (15 - 12), the fourth from the third (17 - 15) etc. I need to do this for every row in the table. I'm sure the answer is simple, but I'm stuck. I know I'll need to loop through each row, but how can I efficiently make this calculation?  </p>

<pre><code>$('#tbl tr').each(function(){
  // help!
)}
</code></pre>
