.eq()
methodThe .eq(N)
method in jQuery is used to the get the Nth matched element.
.eq()
method Syntax.eq(index)
index
is an interger indicating the 0-based position of the element. If the index
is negative,counting backwards from the last element.
.eq()
method ExampleHighlight the item 3 and the second item counting from backwards.
$('li').eq(2).css('background','cyan'); $('li').eq(-2).css('background','cyan');