In a jquery modal dialog, is there a way to select a button as the default action (action to execute when the user presses enter)?
Example of jquery web site: jquer
This worked for me within the dialog using jquery 1.10.2
dialog({ focus: function() { $(this).on("keyup", function(e) { if (e.keyCode === 13) { $(this).parent().find("button:eq(1)").trigger("click"); return false; } }); },
more options...