{"name":"even","type":"selector","title":":even Selector","deprecated":null,"removed":null,"desc":"Selects even elements, zero-indexed. See also odd.","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\n \n \n \n \n
Row with Index #0
Row with Index #1
Row with Index #2
Row with Index #3
\n"},"longdesc":"\n

In particular, note that the 0-based indexing means that, counter-intuitively, :even selects the first element, third element, and so on within the matched set.

\n "}],"slug":"even-selector"}