开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜