How to get a specific jQuery item from a list of items? How to get a specific jQuery item from a list of items? jquery jquery

How to get a specific jQuery item from a list of items?


The get method returns the DOM element, so then you would have to wrap it inside a new jQuery object.

You can use the eq method:

var j = $('ul li').eq(1); // gets the second list item


Use :eq() Selector. For for example, for second element use:

 $("ul li:eq(1)");