jQuery enter key press form submission


/ Published in: jQuery



Copy this code and paste it in your HTML
  1. $('.input').keypress(function(e) {
  2. if(e.which == 13) {
  3. jQuery(this).blur();
  4. jQuery('#submit').focus().click();
  5. }
  6. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.