jQuery 1.4:
$('#menu li:last:not(.ignore)').addClass('last');
HTML:
<div id="menu">
<ul>
<li>item 1</li>
<li>item 2</li>
<li class="ignore">item3</li>
</ul>
</div>
.. last
class is not applied to item 2
. What am I doing wrong here?
Thanks