Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery :gt() Selector

jQuery :gt() Selector

jQuery selector jQuery selector

Example

Select all elements after the first 4:

$("tr:gt(3)")

Try it »


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: used together with other selectors to select elements after a specified position in a specified group (as in the example above).

**Tip:** Please use :lt selector to select elements with an index value less than the specified number.


Syntax

$(":gt(

index

)")

Parameters Description
index Required. Specifies the element to select.
will select elements with an index value greater than the specified number.

jQuery selector jQuery selector