.even() (since jQuery 3.5) reduces the matched set to elements at even zero-based indexes — 0, 2, 4, …. It takes no arguments. Returns a new jQuery object; does not change the DOM.
Syntax
Start with these common calls. Keep them short and readable.
.even() reduces the current jQuery collection to elements at even zero-based indexes — 0, 2, 4, and so on. In a five-item list, that means the 1st, 3rd, and 5th elements (indices 0, 2, 4).
Yes. Official docs emphasize counting from zero. Index 0 is the first element, index 2 is the third. This is position in the jQuery object, not CSS :nth-child numbering.
.even() keeps indexes 0, 2, 4… .odd() keeps indexes 1, 3, 5… Together they split a collection into two alternating groups with no overlap.
Both use zero-based even indexes on the matched set. .even() is a method added in jQuery 3.5. $("li:even") is the older selector form. Prefer .even() on jQuery 3.5+ for clearer chaining.
.even() was added in jQuery 3.5. Older versions do not have this method — use $("li:even") or .filter(":even") instead.
No. It only returns a new jQuery object with the even-indexed elements. Chain .css() or .addClass() if you want visual changes.