title: Fire jQuery event when target does not match selector
body: <p>I've got the following markup:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a href="javascript:void(0)" class=expand&gt;click me&lt;/a&gt;
                  &lt;span&gt;some other content&lt;/span&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  click me too
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And I'm attaching a click handler for the rows to the table:</p>
  
  <pre><code>$('table').on('click', 'tr :not(".expand")', function(evt) {
      if (! $(evt.target).is(selector)) {
          console.log('event is firing even though target doesnt match the selector!!!');
      } else {
          console.log('event is firing as expected');
      }
  });
  
  var selector = $('table').data('events').click[0].selector;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/aaronj1335/vQm6X/10/" rel="nofollow">JSFiddle</a></p>
  
  <p>I want the event to fire only when it originates at an element that matches the <code>tr :not(".expand")</code> selector (the <code>else</code> part of the conditional), but the event fires regardless.</p>
  
  <p><strong>How do I bind the callback to the event at the <code>&lt;table&gt;</code> element such that it only fires when it's not a <code>.expand</code> element that is clicked?</strong></p>
  
  <p><strong>Clarification:</strong> the event handler should still be executed if the user clicks in the <code>&lt;span&gt;some other content&lt;/span&gt;</code></p>