title: jQuery - Find the last and before last row in a table
body: <p>I've got the following html table :</p>
  
  <pre><code>&lt;table id="jTable"&gt;
  
    &lt;tr&gt;
      &lt;td&gt;No&lt;/td&gt;
      &lt;td&gt;Competition&lt;/td&gt;
      &lt;td&gt;John&lt;/td&gt;
      &lt;td&gt;Adam&lt;/td&gt;
      &lt;td&gt;Robert&lt;/td&gt;
      &lt;td&gt;Paul&lt;/td&gt;   
      &lt;/tr&gt;   &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Swimming&lt;/td&gt;
      &lt;td&gt;1:30&lt;/td&gt;
      &lt;td&gt;2:05&lt;/td&gt;
      &lt;td&gt;1:15&lt;/td&gt;
      &lt;td&gt;1:41&lt;/td&gt;   
      &lt;/tr&gt;   &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;Running&lt;/td&gt;
      &lt;td&gt;15:30&lt;/td&gt;
      &lt;td&gt;14:10&lt;/td&gt;
      &lt;td&gt;15:45&lt;/td&gt;
      &lt;td&gt;16:00&lt;/td&gt;   
      &lt;/tr&gt;   &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;Shooting&lt;/td&gt;
      &lt;td&gt;70%&lt;/td&gt;
      &lt;td&gt;55%&lt;/td&gt;
      &lt;td&gt;90%&lt;/td&gt;
      &lt;td&gt;88%&lt;/td&gt;   
      &lt;/tr&gt;   &lt;tr&gt;
      &lt;td&gt;Total&lt;/td&gt;
      &lt;td&gt;Blablabla&lt;/td&gt;
      &lt;td&gt;1000&lt;/td&gt;
      &lt;td&gt;1000&lt;/td&gt;
      &lt;td&gt;1000&lt;/td&gt;
      &lt;td&gt;1000&lt;/td&gt;   &lt;/tr&gt; 
  &lt;/table&gt;
  </code></pre>
  
  <p>What I'm trying to do is to hide all the rows except for the first, the before last and the last one. Here's how I'm doing : </p>
  
  <pre><code>$('#jTable').find('tr:gt(0):not(:last)').slideToggle();
  </code></pre>
  
  <p>This jQuery script only keeps the first and last row. Knowing the fact that I must use jQuery 1.7.1 (so I can't use the nth-last-child property), I was looking for a way to select the before last row.</p>