Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
像我这样的突击队员怎么能选择一个没有名为“active”的类的元素,使用臭名昭著的强大的 jQuery Sizzle CSS 和其他一切 - 选择器?
我试过:
$('a[class!="active"]').etc();
但它没有给出足够的结果。
$('a:not(.active)')
应该管用
你的也可以。刚刚测试:http: //jsfiddle.net/UP6a7/