Modal component.
Classes
Methods
(static) .destroy()
Remove event listeners and close all open modals.
(static) .hideModal(modalID)
Hides all modals or specific modalID
Parameters:
Name | Type | Description |
---|---|---|
modalID |
string | ID of modal to hide (optional) |
(static) .init(context)
Initialise plugin
Parameters:
Name | Type | Description |
---|---|---|
context |
Node | a DOM element to limit selection to. |
(static) .showModal(modalID)
Displays a modal.
Parameters:
Name | Type | Description |
---|---|---|
modalID |
string | event | ID of modal to show or click event, the target of which contains a data-modal-id attribute. |