title: jquery :not() selector inside delegated event
body: <p>I tried to use the <code>:not()</code> selector inside an delegated event like</p>
  
  <pre><code> $('#sidebar-nav').on('click', 'a.documents:not(span)', function(e){
  
   // code
  
   });
  </code></pre>
  
  <p>but it's not working. So how to write delegated click event in order to select the link but not the <code>&lt;span&gt;</code> element inside it?
  The Event has to be delegated because all links are added dynamically.</p>
  
  <p>Thanks for any hint.</p>