jQuery: Target all except ___?

前端 未结 4 1821
终归单人心
终归单人心 2020-12-06 09:53

I\'m looking for a way to select all elements on a page, except those with a specified DOM location.. Here\'s an example of what I\'d like to do:

jQuery(\'*\         


        
4条回答
  •  感动是毒
    2020-12-06 10:39

    You want to use the :not() selector:

    jQuery(":not(.ignore)").bind("click", function(e) { ... });
    

提交回复
热议问题