jquery-ui Dialog: Make a button in the dialog the default action (Enter key)

Posted by zesc on Stack Overflow See other posts from Stack Overflow or by zesc
Published on 2010-03-26T09:23:34Z Indexed on 2010/03/26 14:53 UTC
Read the original article Hit count: 685

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: jquery dialog modal message

In the example above the dialog closes when the user presses Esc. I would like the "Ok" button action to be called when the user presses Enter.

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about modal-dialog