jQuery :gt()Selector

jQuery 选择器jQuery Selector

Examples

Select all <tr> elements after the first 4:

$("tr:gt(3)")

Try it Yourself »

Definition and Usage

The :gt() selector selects elements with an index value greater than the specified number.

Index values start at 0.

Most common usage: use it with other selectors to select elements after a specific position in a specified combination (as in the example above).

Tip:Use:lt selectorto select elements with an index value less than the specified number.


Syntax

$(":gt(index)")

Parameter Description
index Required. Specifies the elements to select.
Selects elements with an index value greater than the specified number.


jQuery 选择器jQuery Selector

Other Extensions