jQuery:Selector :gt(index)

Overview

Matches all elements that are greater than the given index value.

Parameter

index   Number  V1.0

Counts from 0.

Demo

Description:

Find the second and third rows, the index values are 1 and 2, that is, greater than 0.

HTML code:
<table>
  <tr><td>Header 1</td></tr>
  <tr><td>Value 1</td></tr>
  <tr><td>Value 2</td></tr>
</table>
jQuery code:
$("tr:gt(0)")
Result:
[ <tr><td>Value 1</td></tr>, <tr><td>Value 2</td></tr> ]

Leave a Reply

Your email address will not be published. Required fields are marked *