if you create html layout like so
<ul>
<li class='a'></li>
<li class='b'></li>
<li class='a'></li>
<li class='b'></li>
<li class='a'></li>
<li class='b'></li>
<li class='a'></li>
<li class='b'></li>
</ul>
and try to select odd elements with 'a' class like so $$('.a:odd') you will get empty array, and if you do $$('.a:even') you will get all four li elements with 'a' class.. It really strange.. But im new to mootools, maybe im doing something wrong..
So my question is how to select first and third li elements with a class. I know that i can do it with function like this
$$('.a').filter(function(item, index) { return index%2; }
but its too complicated for such small task as selecting odd or even elements..