Easy Tutorial
❮ Event Keyup Css Offsetparent ❯

jQuery :odd Selector

jQuery Selectors

Example

Select every alternate (odd) <tr> element:


Definition and Usage

The :odd selector selects every element with an odd index number (e.g., 1, 3, 5, etc.).

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

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

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


Syntax


jQuery Selectors

❮ Event Keyup Css Offsetparent ❯