How to ignore multiple classes using the :not selector?

后端 未结 2 1866
挽巷
挽巷 2020-12-08 09:04

I have this selector below where it ignores any li with the class show-all-boxes

$(\'.boxes li:not([class=\"show-all-boxes\"])         


        
2条回答
  •  佛祖请我去吃肉
    2020-12-08 09:37

    The :not selector can take multiple CSS selectors as arguments ( http://api.jquery.com/not-selector ). E.g.

    $('div:not(.a,.b)').empty()
    

    http://jsfiddle.net/HFfcP/

提交回复
热议问题