Detect click on a specified area
<pre><code>&lt;div id="main"&gt;
hello world
&lt;div id="second-div"&gt;
bye
&lt;/div&gt;
&lt;/div&gt;

jQuery('#main:not(second-div)').click(function() {
alert('works!');
});
</code></pre>

<p>I want to detect mouse click on the "main" div, but the click event shouldn't trigger when I click on the "second-div" div.
I've tried using ":not(second-div)" but the click triggers anyway.</p>
