title: How to Exclude Child Element from jQuery Event Handler?
body: <p>I am modifying an existing web page. I added a <code>&lt;textarea&gt;</code> to the page, but found that the Enter key doesn't work as expected.</p>
  
  <p>After spending considerable time searching, I found the following:</p>
  
  <pre><code>$('form').keypress(function (e) {
      if (e.keyCode == 13)
          return false;
  });
  </code></pre>
  
  <p>I need to leave as much as much of the existing functionality in place as I can. But I need to disable this for my <code>&lt;textarea&gt;</code>. (It appears mine is the only <code>&lt;textarea&gt;</code> on the page.</p>
  
  <p>But how can I do this? I thought about adding <code>.not('textarea')</code> to the selector above. But that doesn't work because the handler is on the form, which is not a textarea.</p>
  
  <p>I can I exclude <code>&lt;textarea&gt;</code>s from the filter above?</p>