I have an HTML form with a single submit input, but also various button elements. When the user presses the \'enter\' key, I\'d expect it to actually s
submit
button
$("form#submit input").on('keypress',function(event) { event.preventDefault(); if (event.which === 13) { $('button.submit').trigger('click'); } });