jQuery选择一个具有某个类的div,没有另一个类 [英] jQuery select a div with a certain class, that doesn't have another class
本文介绍了jQuery选择一个具有某个类的div,没有另一个类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<div class="fuu">
...
</div>
<div class="fuu no">
...
</div>
...
如何选择
How can I select all fuu
's besides the ones that have the .no
class?
推荐答案
使用 :not()
以排除其他类:
Use :not()
to exclude the other class:
$('.fuu:not(.no)')
这篇关于jQuery选择一个具有某个类的div,没有另一个类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文