马切克·德拉比奇
我想找到每个具有“non-clicable”类但没有“hide”类的导航器。我写这个
$(".non-clicable").hasNot(".hide")
但它不起作用(找到每个匹配“.non-clicable”和 hasNot 的导航器就像被忽略。我也尝试调试并发现这个:
我已经用过
($(".non-clicable") - $(".non-clicable").filter(".hide"))
它工作正常,但看起来并不优雅。是否存在错误或我以不正确的方式使用该功能?
拉什比
你可以试试:
$(".non-clicable", class: notContains(".hide"))
或者:
$(".non-clicable").not(".hide")
还工作:
$(".non-clicable",not : "hide")
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
编辑于
我来说两句