title: jQuery - Bind click to all elements excluding class?
body: <p>am trying to bind a click to all elements that don't have a specific class.</p>
  
  <p>I tried the following and after some googleing, it looks like it the right thing to do.</p>
  
  <pre><code>$('*:not(.class)').click(function() {
      alert('Clicked...');
  });
  
  $(':not(.class)').click(function() {
      alert('Clicked...');
  });
  </code></pre>
  
  <p>Now, what I've just realised while writing this is that elements are layered on top of other elements, and all the elements under a click trigger a click too? Is this correct? I think it is as when the following code is executed I would get between 3 and 6 "clicks" per click.</p>
  
  <pre><code>$('*').click(function() {
      console.log('click');
  });
  </code></pre>
  
  <p>Does anyone have any light to shed?</p>
  
  <p><strong>EDIT (Already):</strong> Ive just thought of a workaround, as follows:</p>
  
  <pre><code>$('*').click(function() {
      if ($(this).hasClass('class')) {
          console.log('click');
          return false;
      } else {
          console.log('click');
      }
  });
  </code></pre>
  
  <p><strong>LOGIC:</strong> This "class" element will be the top layered element and therefore will trigger the first click (theory-crafting) therefore is it has the class we return/break;</p>