How add class to last TD in table in which is rowspan. With jQuery
<p>Hello I have this table</p>

<pre><code>&lt;table&gt;
&lt;tr&gt;
    &lt;td&gt;n&lt;/td&gt;
    &lt;td rowspan=2&gt;n&lt;/td&gt;
    &lt;td&gt;n&lt;/td&gt;
    &lt;td&gt;n&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td rowspan=2&gt;y&lt;/td&gt;
    &lt;td&gt;n&lt;/td&gt;
    &lt;td rowspan=2&gt;y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;y&lt;/td&gt;
    &lt;td&gt;y&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p></p>

<p>and I need mark last visual TD by class <code>.last</code>. Without rowspan there isnt problem, I can use</p>

<pre><code>$('table tr:last td').addClass('last');
</code></pre>

<p><strong>I need add class <code>.last</code> to <code>td</code> with value y</strong></p>

<p>Some examples with cells with 'y' which I want to mark witch class
<a href="http://jsfiddle.net/9gtMa/" rel="nofollow">http://jsfiddle.net/9gtMa/</a></p>

<p><a href="http://jsfiddle.net/MQh8u/" rel="nofollow">http://jsfiddle.net/MQh8u/</a></p>

<p><a href="http://jsfiddle.net/zL6Pe/" rel="nofollow">http://jsfiddle.net/zL6Pe/</a></p>

<p>I need output like</p>

<pre><code>&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;n&lt;/td&gt;
        &lt;td rowspan=2&gt;n&lt;/td&gt;
        &lt;td&gt;n&lt;/td&gt;
        &lt;td&gt;n&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td rowspan=2 class='last'&gt;y&lt;/td&gt;
        &lt;td&gt;n&lt;/td&gt;
        &lt;td rowspan=2 class='last'&gt;y&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td class='last'&gt;y&lt;/td&gt;
        &lt;td class='last'&gt;y&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>
