Odd and even in jQuery

Odd and even in jQuery
0

#1

I didn’t really get the difference between even and odd here. If odd is even in jQuery and even is even too, what’s odd?


#2

Well… this is odd. But :odd selects second element (index 1), fourth element (index 3) and so on. :even selects first (index 0) element, third element (index 2) and so on. So the way it is stated, is slightly complicated. But in this case you should just use :even.