title: javascript syntax for keypress
body: <p>I'm trying to learn javascript and I cannot figure out what's wrong with the following simple code.</p>
  
  <pre><code>function typeCatch() {
      alert("key pressed");
  }
  
  $(function () {
      $("textarea.redactor_editor").on("keypress", typeCatch);
  });
  </code></pre>
  
  <p>Basically you would get an alert message everytime you write something in the provided form. </p>
  
  <ol>
  <li>What's wrong with this code? <code>typeCatch()</code> isn't called when I'm typing in the form.</li>
  <li>How would I debug this if a similar problem happened? Nothing shows up in the console box in firebug.</li>
  </ol>
  
  <p><a href="http://jsfiddle.net/4wmup/1/" rel="nofollow">http://jsfiddle.net/4wmup/1/</a></p>