title: jQuery: Prevent enter key
body: <p>I am trying to prevent the <kbd>enter</kbd> key from being put into a textarea, but it doesn't seem to work.</p>
  
  <pre><code>$('#comment').keyup(function(event) {
    if (event.text.charCodeAt() == '10') {
       event.preventDefault();
     }
  });
  </code></pre>