Easy Tutorial
❮ Html Detach Sel Attribute End Value ❯

jQuery :lt() Selector

jQuery Selectors

Example

Select the first 4 <tr> elements:


Definition and Usage

The :lt() selector selects elements with an index less than the specified number.

The index starts at 0.

Common usage: Used in conjunction with other selectors to select elements before a specific index in a specified combination (as in the example above).

Tip: Use the :gt selector to select elements with an index greater than the specified number.


Syntax

Parameter Description
index Required. Specifies the element to be selected. <br>Selects elements with an index less than the specified number.

jQuery Selectors

❮ Html Detach Sel Attribute End Value ❯