jQuery:Selector :eq(index)

Overview

Matches an element with a given index value.

Parameter

index Number V1.0

Counts from 0.

Demo

Description:

Find the second line.

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:eq(1)")
Result:
[ <tr><td>Value 1</td></tr> ]

Leave a Reply

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