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
In your dialog's open function, you can focus the button:
$("#myDialog").dialog({ open: function() { $(this).parents('.ui-dialog-buttonpane button:eq(0)').focus(); } });
Change the :eq(0) if it's at a different index, or find by name, etc.
:eq(0)