1. Create a new modal with given content:
$.d_modal(content [, options]);
2. Turn an existing DOM element (element
) into a modal:
$element.d_modal([options]);
3. Dismiss a previously created modal:
$modal.trigger("dismiss.d_modal");
Any valid html. Will be contained in the modal that is created.
A jQuery object. Will be turned into a modal (the class .d-modal
will be added to it).
A reference to a previously created modal.
div.d-modal-blackness
over the page, until the modal is dismissed.
Always dismiss the modal by triggering the dismiss.d_modal
event, as such:
$(".d-modal").trigger("dismiss.d_modal");
The normal jQuery calls (hide()
, remove()
, fadeOut()
, slideUp()
,
etc.) may have erratic behaviour.
Calling either text()
or html()
to set the content of a modal will
overwrite control elements used, and may have unforeseen consequences.