How to select even or odd elements based on class name

前端 未结 4 1581
既然无缘
既然无缘 2021-01-23 21:05

if you create html layout like so

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 21:31

    If you are trying to get the 1st and third, you just need $$('.a').

    Are you trying to get the 1st and 5th items? That would be something like $$('a:nth-child(4n+1))

    I am assuming mootools uses css3 Structural pseudo-classes

提交回复
热议问题