control-freak-ide/Control-Freak-Documentation/jQuery/docs/entries/even-selector.json
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1 line
999 B
JSON

{"name":"even","type":"selector","title":":even Selector","deprecated":null,"removed":null,"desc":"Selects even elements, zero-indexed. See also <ahref=\"/Selectors/odd/\">odd</a>.","categories":["selectors/basic-filter-selectors","selectors/jquery-selector-extensions","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Finds even table rows, matching the first, third and so on (index 0, 2, 4 etc.).","code":"\n$( \"tr:even\" ).css( \"background-color\", \"#bbf\" );\n","css":"\n table {\n background: #eee;\n }\n","html":"\n<table border=\"1\">\n <tr><td>Row with Index #0</td></tr>\n <tr><td>Row with Index #1</td></tr>\n <tr><td>Row with Index #2</td></tr>\n <tr><td>Row with Index #3</td></tr>\n</table>\n"},"longdesc":"\n <p>In particular, note that the <em>0-based indexing</em> means that, counter-intuitively, <code>:even</code> selects the first element, third element, and so on within the matched set.</p>\n "}],"slug":"even-selector"}