Combining jQuery :not and :nth-child selectors

前端 未结 5 752
礼貌的吻别
礼貌的吻别 2021-01-19 06:56
$j(\'.select-all-these:not(.except-these):nth-child(3n)\');

I\'m trying to select every third item that doesn\'t have a particular class. This is m

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 07:36

    How about using the method to filter the results instead?

    $('.select-all-these:nth-child(3n)').not('.except-these');
    

    Here's a fiddle to demonstrate: http://jsfiddle.net/ntNgC/

提交回复
热议问题