How to look for all the rows in a rowspan and set a class to all the rows
<p>I have a table </p>

<pre><code>&lt;table border="1"&gt;
    &lt;tr&gt;
        &lt;td rowspan="2"&gt;September&lt;/td&gt;
        &lt;td&gt;Jim&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Dave&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;October&lt;/td&gt;
        &lt;td&gt;Fred&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>using the code I am able to apply the class Red to the first row of the rowspan only, i.e, only Jim is being highlighed red and not Dave.  I also want Dave to have the class Red...Please note I want to apply the class per row and not per cell.</p>

<pre><code>var fullRowNumCells=1;

$('#table tr').each(function(){
    if( $(this).find('td').length==fullRowNumCells){

        if($.trim($(this).find('td:first').html()!=''))
        {

                $(this).addClass("red"); 
         }            
   }            
});
</code></pre>
