1 line
910 B
JSON
1 line
910 B
JSON
{"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<table>\n <tr><td>Row 1</td></tr>\n <tr><td>Row 2</td></tr>\n <tr><td>Row 3</td></tr>\n</table>\n"},"longdesc":"\n <p>The <code>:first</code> pseudo-class is equivalent to <code>:eq( 0 )</code>. It could also be written as <code>:lt( 1 )</code>. While this matches only a single element, <a href=\"/first-child-selector/\">:first-child</a> can match more than one: One for each parent.</p>\n "}],"slug":"first-selector"} |