Site icon Sibeesh Passion

Find the Second Last Element In JQuery

In this post we will see how we can find the second last element from a collection using JQuery collection.

[js]
$(‘#columnsList li:nth-last-child(2)’);
[/js]

Here columnsList is the ID of our element which has the collection. In my case I am having li as inner elements.

Please see my other posts related to JQuery here: JQuery Posts

Kindest Regards
Sibeesh Venu

Exit mobile version