title: How do I execute a function on an event on any element but one with jQuery?
body: <p>I want to execute a function on an event on any element but one:</p>
  
  <pre><code>$(":not('#myelement')").bind('mousedown', function() {
      console.log('mousedown event');
  });
  </code></pre>
  
  <p>but when I click #myelement, the function is executed anyway, because the selector select all the parents. Moreover, the function is executed for every parent.
  How can I:
  -execute the function only once?
  -not execute the function on my element?</p>
  
  <p>Here's the full issue:</p>
  
  <pre><code>$("#current_page a").toggle(
      function(){
          $("#current_menu").hide();                    
          return false;
      },
      function(){
          $("#current_menu").show();
          return false;
      }
  );
  
  $(":not(#current_page a)").bind('mousedown',function() {               
      $("#current_menu").hide();
  });
  </code></pre>
  
  <p>When clicking on "#current_page a", the mousedown event is triggered, and I don't want to.</p>
  
  <p>thanks
  jul</p>