title: disable enter key on specific textboxes
body: <p>I was looking for a way to do this, got a few scripts, but none of them is working for me.</p>
  
  <p>When I hit enter in my textboxes, it shouldn't do anything.</p>
  
  <p>I have tried a few JavaScript and jQuery scripts, but nothing is working for me.</p>
  
  <pre><code>$(document).ready(function() {
      $('#comment').keypress(function(event) {
          if (event.keyCode == 13) {
              event.preventDefault();
          }
      });
  
      $('#comment').keyup(function() {
          var txt = $('#comment').val();
          $('#comment').val(txt.replace(/[\n\r]+/g, " "));
      });
  });
  </code></pre>