Easy Tutorial
❮ Event Unload Eff Slidedown ❯

jQuery :even Selector

jQuery Selectors

Example

Select every alternate (even) <tr> element:


Definition and Usage

The :even selector selects every element with an even index number (e.g., 0, 2, 4, etc.).

The index values start from 0, where the first element is even (0), the second element is odd (1), and so on.

The most common usage: Used in conjunction with other selectors to select every even-numbered element in a specified combination (as in the example above).

Tip: Use the :odd selector to select elements with odd index numbers.


Syntax


jQuery Selectors

❮ Event Unload Eff Slidedown ❯