JQuery :not selector being ignored?
<p>Don't know if I'm using the not selector incorrectly but I want everything clicked on to do something apart from the id in the not selector.</p>

<p>Neither of these have worked, I get an alert when the logo is clicked:</p>

<pre><code>$('body').not('#logo').click(function(){ 
alert('hi');
});

$('body:not(#logo)').click(function(){ 
alert('hi');
});
</code></pre>

<p>And the html:</p>

<pre><code>    &lt;!DOCTYPE html&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
    &lt;title&gt;Untitled Document&lt;/title&gt;
    &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type='text/javascript'&gt;
    $(document).ready(function(){

    $('body').not('#logo').click(function(){ 
    alert('hi');
    });

    });
    &lt;/script&gt;
    &lt;/head&gt;

    &lt;body&gt;
    &lt;div style='width:900px; margin:0 auto; background-color:red; height:600px;'&gt;
    &lt;div id='logo' style='background-color:black; width:200px; height:200px;'&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
