X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

jQuery :eq() Selector

jQuery Selectors 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 jQuery Selectors


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook