I am trying to prevent the enter key from being put into a textarea, but it doesn't seem to work.
$('#comment').keyup(function(event) { if (event.text.charCodeAt() == '10') { event.preventDefault(); } });