jQuery select a div with a certain class, that doesn't have another class

前端 未结 3 785
渐次进展
渐次进展 2020-12-24 00:17
...
...
...

How can I select all fuu\'s besides

相关标签:
3条回答
  • 2020-12-24 00:36

    Use :not() to exclude the other class:

    $('.fuu:not(.no)')
    
    0 讨论(0)
  • 2020-12-24 00:49

    You can also filter out the '.no' class with something like:

    $('.fuu').not('.no');
    
    0 讨论(0)
  • 2020-12-24 00:51

    get the div's class name, if it has a SPACE in the class name then it means it has more than one class !

    0 讨论(0)
提交回复
热议问题