I want to check the li that is the last li in ul. How can I check that using jQuery?
li
ul
Just use the following
if($('#ulscroller li:last-child')[0] == liTocheck) { alert("This is the last li"); }
Or
if($('#ulscroller li').last()[0] == liTocheck) { alert("This is the last li"); }
Here liTocheck is the li that needs to be compared
liTocheck