Howdy Guys,
Got some code here that isn't working:
$("#sidebar ul li:last").each(function(){
$(this).addClass("last");
});
Basically I have 3 lists and want to add a class (last) to each item appearing last in each unordered list.
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li class="last">Item 3</li>
</ul>
Hope that makes sense, Cheers!