Easy Tutorial
❮ Eff Stop Jq Sel Empty ❯

jQuery eq() Method

jQuery Traversal Methods

Example

Select the second <p> element (index number 1):


Definition and Usage

The eq() method returns the element with the specified index number from the selected elements.

The index number starts from 0, so the index number of the first element is 0 (not 1).


Syntax

Parameter Description
index Required. Specifies the index of the element. Can be an integer or a negative number. <br> <br> Note: Using a negative number will count the index from the end of the selected elements.

More Examples

Using Negative Numbers


jQuery Traversal Methods

❮ Eff Stop Jq Sel Empty ❯