开发者

How to select all elements except the ones with a given class, using jQuery?

开发者 https://www.devze.com 2022-12-15 21:18 出处:网络
I want to select all elements in my page except th开发者_开发知识库ose with the class \"searchBox\".

I want to select all elements in my page except th开发者_开发知识库ose with the class "searchBox".

How can I do that?

I want to disable text selection on all elements except input elements


$('* :not(.searchBox)'); 

* : Matches all elements.

not: Filters out all elements matching the given selector

0

精彩评论

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