开发者

How to select an element which doesn't have a specific class name, using jQuery?

开发者 https://www.devze.com 2023-04-04 17:14 出处:网络
How could a Commando, like myself, select an element witch does not have a class named \"active\", using the infamous and powerful jQuery Sizzle CSS and eve开发者_如何学编程rything else - Selector?

How could a Commando, like myself, select an element witch does not have a class named "active", using the infamous and powerful jQuery Sizzle CSS and eve开发者_如何学编程rything else - Selector?

I've tried with:

$('a[class!="active"]').etc();

But it gives no adequate results.


$('a:not(.active)')

should work


yours works as well. just tested: http://jsfiddle.net/UP6a7/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号