jQuery: how do I check if an element is the last sibling?
<p>How do I check if an element is the last sibling?</p>

<p>For the last cell in a row I want to perform a different action.</p>

<p>This doesn't work:</p>

<pre><code>$('td').each(function(){
    var $this = $(this);
    if ( $this === $this.parent().last('td') )
        {
            alert('123');
        }
})
</code></pre>

<p>And neither does it if I remove <code>.parent()</code>.</p>
