{"name":"first","type":"selector","title":":first Selector","deprecated":null,"removed":null,"desc":"Selects the first matched element.","categories":["selectors/basic-filter-selectors","selectors/jquery-selector-extensions","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Finds the first table row.","code":"\n$( \"tr:first\" ).css( \"font-style\", \"italic\" );\n","css":"\n td {\n color: blue;\n font-weight: bold;\n }\n","html":"\n
| Row 1 |
| Row 2 |
| Row 3 |
The :first pseudo-class is equivalent to :eq( 0 ). It could also be written as :lt( 1 ). While this matches only a single element, :first-child can match more than one: One for each parent.