Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

jQuery :eq() Selector

❮ jQuery Selectors

Example

Select the second <p> element:

$("p:eq(1)")
Try it Yourself »

Definition and Usage

The :eq() selector selects an element with a specific index number.

The index numbers start at 0, so the first element will have the index number 0 (not 1).

This is mostly used together with another selector to select a specifically indexed element in a group (like in the example above).


Syntax

$(":eq(index)")

Parameter Description
index Required. Specifies the index of the element

❮ jQuery Selectors