jQuery - how to select all table rows between two table rows in same table
<p>I have a table that has structure like this (td omitted)</p>

<pre><code>&lt;table&gt;
&lt;tr class="header"&gt;...&lt;/tr&gt;
&lt;tr class="row"&gt;...&lt;/tr&gt;
&lt;tr class="row"&gt;...&lt;/tr&gt;
&lt;tr class=="header"&gt;...&lt;/tr&gt;
&lt;tr class="row"&gt;...&lt;/tr&gt;
&lt;tr class="row"&gt;...&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>When user click on the row I need to hide all rows up to the next row that has class "header". 
What would be the easiest way to achieve this. Something along these lines, find all rows that have class header, find in the list row index of the clicked row, find the row index of the next row with the same class, and then select all rows within these two indicies? </p>
