jQueryMobile - SimpleDialog2

Home

jQuery Mobile Framework :: SimpleDialog

A Popup Dialog Box for jQueryMobile

Public Data Access

SimpleDialog2 has a few publicly available data points:

  • $.mobile.sdCurrentDialog

    The currently running dialog object - reference removed on close.

  • $.mobile.sdLastInput

    The value from the input element in Button->Input mode

Common function tasks:

  • $.mobile.sdCurrentDialog.close();

    Immediatly close the open dialog

  • $.mobile.sdCurrentDialog.updateBlank('-NEW HTML-');

    Replace the HTML in an *open* blank dialog with "content"

  • $(document).trigger('simpledialog', {'method':'close'});

    Immediatly close all open dialogs (Note: nesting probably is a bad, bad idea)

Other Goodies

When using the "blank" mode, you can include a link/button/element with rel='close' in the HTML - when clicked, it will automatically close the dialog.