0.5.2 • Published 7 years ago

jquery-dialog v0.5.2

Weekly downloads
79
License
MIT
Repository
github
Last release
7 years ago

jquery-dialog

jQuery plugin that creates the basic interactivity for an ARIA dialog widget.

Expected dialog markup adheres to bones convention:

<div aria-labelledby="dialog-0-title" class="dialog" id="dialog-0" hidden role="dialog">
    <div role="document">
        <header>
            <button aria-label="Close Dialog" type="button"></button>
            <h2 id="dialog-0-title">Dialog Title</h2>
        </header>
        <div>
            <p>The dialog content goes here.</p>
            <a href="http://www.ebay.com">www.ebay.com</a>
        </div>
    </div>
</div>

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:

<button class="dialog-button" data-jquery-dialog-button-for="dialog-0" type="button">Open Dialog</button>

Then call the dialogButton plugin on the button:

$('.dialog-button').dialogButton();

Or, to activate the dialog at page load time, call the dialog plugin directly:

$('#dialog-0').dialog();

Events

Dialog triggers two events when opened and closed:

  • dialogOpen
  • dialogClose
0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago