jQuery plugin that creates the basic interactivity for an ARIA dialog widget.
npm install jquery-dialogjQuery plugin that creates the basic interactivity for an ARIA dialog widget.
Expected dialog markup adheres to bones convention:
``html`
Note the use of the 'hidden' attribute to ensure the dialog begins in a hidden state.
To activate the dialog using a button, ensure that the jquery-dialog-button-for data attribute refers to the id of the dialog:
`html`
Then call the dialogButton plugin on the button:
`js`
$('.dialog-button').dialogButton();
Or, to activate the dialog at page load time, call the dialog plugin directly:
`js`
$('#dialog-0').dialog();
Dialog triggers two events when opened and closed:
* dialogOpendialogClose`
*