title: Check all tr elements for visibility:hidden between two same class tr elements
body: <p>i've searched many place but i couldn't find a proper way to do it.<br>
  I have following structure for a table.<br></p>
  
  <pre><code> &lt;tr class="header"&gt;
        &lt;td colspan="9"&gt;Header 1&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="filter"&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="filter"&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
        &lt;td&gt;lorem ipsum&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="header"&gt;
        &lt;td colspan="9"&gt;Header 2&lt;/td&gt;
   &lt;/tr&gt;
  </code></pre>
  
  <p>I am using a live table filter plugin (that effects td elements which has filter class ) for filtering unnecessary rows (with an input box).<br>
  As you can guess, plugin searchs every <code>tr.filter</code> elements and if no match it hides filter classed row.<br>
  But after when all <code>tr.filter</code> elements are hidden header rows are still visible.<br>
  So i want that:<br>
  Check for every <code>tr.header</code> elemets, if all <code>tr.filter</code> elements are hidden until next <code>tr.header</code> element that hide this <code>tr.header</code> element as well.<br>
  Eg: if there is no visible tr element between <strong>Header 1</strong> and <strong>Header 2</strong> rows, then <strong>Header 1</strong> row will be hidden as well.<br></p>
  
  <p>I tried following for this, but no success:<br></p>
  
  <pre><code> $('tr.header').each(function(){
        if ($(this).nextUntil("tr.header").is(":hidden")){
        //i tried if ($(this).nextUntil("tr.header").css('display') == 'none'){
             $(this).hide();
        } else {
             $(this).show()
        }
   });
  </code></pre>