How do I select the entire document except for a certain field?
<p>I'm trying to select the entire document except for a certain div. In my belief the code below should work but it isn't. Can anyone see what I'm doing wrong?</p>

<pre><code>$(document:not("#test")).bind('keydown',function(e){
  switch(e.which) {
  case 8:
  $("#status").append("&lt;br/&gt;captured");
  break;
  default:
  break;
  }
});
</code></pre>

<p>HTML to go with:</p>

<pre><code>&lt;textarea id="test" &gt;&lt;/textarea&gt;&lt;br/&gt;
&lt;input type="text" id="message"/&gt;
&lt;div id="status"&gt;&lt;/div&gt;
</code></pre>

<p>I have also tried several variants of this</p>

<pre><code>//$("*:not(#message)").bind('keydown',function(e){
</code></pre>
