Select all elements except a div and its contents
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1467226/jquery-target-all-except">jQuery: Target all except ___?</a>  </p>
</blockquote>



<p>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.</p>

<p>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.</p>

<p>Here's some sample code:</p>

<pre><code>&lt;div id="clickme"&gt;This is good stuff&lt;/div&gt;

&lt;div id="dontclickme"&gt;This should not get selected&lt;/div&gt;
</code></pre>

<p>I'm currently using <code>$("*")</code> for my selector. Is there a way to use that to detect if it's the second div, or any of its children?</p>
