I have a searchbox on my site that. Currently, users must click the submit button next to the box to search via jquery\'s post. I would like to let users also press enter
$('#usersSearch').keyup(function() { // handle keyup event on search input field var key = e.which || e.keyCode; // store browser agnostic keycode if(key == 13) $(this).closest('form').submit(); // submit parent form }