{"name":"odd","type":"selector","title":":odd Selector","deprecated":null,"removed":null,"desc":"Selects odd elements, zero-indexed. See also even.","categories":["selectors/basic-filter-selectors","selectors/jquery-selector-extensions","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Finds odd table rows, matching the second, fourth and so on (index 1, 3, 5 etc.).","code":"\n$( \"tr:odd\" ).css( \"background-color\", \"#bbbbff\" );\n","css":"\n table {\n background: #f3f7f5;\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, :odd selects the second element, fourth element, and so on within the matched set.

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