jquery - Need to intercept click on page but not specific a tag with id -


i need intercept click on every element in page (a, img, link, etc) not specific a tag specific id (go-privacy).

in detail code, :not jquery doesn't match.

$('html').on('click', '*:not( #go-privacy )', function() {     // stuff  }); 

thank you

you can use

$('body *:not(#go-privacy)').on('click', function() {         alert('click'); }); 

demo here


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -