title: jQuery Need to loop through next elements based on rowspan
body: <p>Well, basically, I have a table set up like so, but <code>&lt;td&gt;</code> elements can have any number of rowspans...</p>
  
  <pre><code>&lt;table width="100%"&gt;
      &lt;tr class="tablerow0"&gt;
          &lt;td class="tablecol_0" colspan="4"&gt;Content&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="tablerow1"&gt;
          &lt;td class="tablecol_0" rowspan="2"&gt;More Content&lt;/td&gt;
          &lt;td class="tablecol_1" colspan="3"&gt;Some More Content&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="tablerow2"&gt;
          &lt;td class="tablecol_1"&gt;And Yet More Content&lt;/td&gt;
          &lt;td class="tablecol_2"&gt;Content&lt;/td&gt;
          &lt;td class="tablecol_3"&gt;Content&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Ok, so what I'd like to do is determine the number of rowspans which can be done like so:</p>
  
  <pre><code>$("td").each(function() {
      $(this).attr('rowspan');
  });
  </code></pre>
  
  <p>But I need to <code>return false</code> out of this each function for each rowspan greater than 1.  For example, when it finds the  element with a rowspan of 2, it should not continue onto the next  element, because the rowspan is attached to the next  element.  BUT MORE IMPORTANTLY, I need to loop through the rowspans for <code>&lt;tr&gt;</code> elements.</p>
  
  <p>Example, if I have this table setup:</p>
  
  <pre><code>&lt;table width="100%"&gt;
      &lt;tr class="tablerow0"&gt;
          &lt;td class="tablecol_0" rowspan="2"&gt;Content&lt;/td&gt;
          &lt;td class="tablecol_1"&gt;Content&lt;/td&gt;
          &lt;td class="tablecol_2"&gt;Content&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="tablerow1"&gt;
          &lt;td class="tablecol_1"&gt;More Content&lt;/td&gt;
          &lt;td class="tablecol_2"&gt;Some More Content&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="tablerow2"&gt;
          &lt;td class="tablecol_1"&gt;And Yet More Content&lt;/td&gt;
          &lt;td class="tablecol_2"&gt;Content&lt;/td&gt;
          &lt;td class="tablecol_3"&gt;Content&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Than it will need to get the last <code>&lt;tr&gt;</code> in here with <code>class="tablerow2"</code> because the rowspan only covers <code>tablerow0</code> and <code>tablerow1</code>.</p>
  
  <p>Hopefully you get what I mean, it needs to be able to loop within the <code>&lt;td&gt;</code> elements and only do something when the <code>rowspan</code> quantity has been exceeded for those <code>&lt;tr&gt;</code> elements in the table.  The rowspan can be more than 2, I'm just simplifying this for people to grasp what I'm asking here.  Also, there can be more than 1 <code>&lt;td&gt;</code> element with a rowspan greater than 1 so, it should be able to know this as well.  I'm thinking I will need to build an array of rowspans here, and the array length will be based on each <code>&lt;td&gt;</code> rowspan value.</p>