Possible Duplicate:
jQuery: Target all except ___?
I've got a script that detects clicks on every element on the page. I'd like that to run on everything except a specific div and its children.
I've tried doing this using the :not selector, but don't really understand how to use that effectively, so I'm not sure if that's the right way to go or not.
Here's some sample code:
<div id="clickme">This is good stuff</div>
<div id="dontclickme">This should not get selected</div>
I'm currently using $("*")
for my selector. Is there a way to use that to detect if it's the second div, or any of its children?