SimpleModal is a lightweight jQuery plugin that provides a simple interface to create a modal dialog.
Note: please consider using UI::Dialog instead.$('#myDiv').modal();
. This call would place the DOM object, #myDiv, inside a modal dialog. Chaining requires a jQuery object. An optional options object can be passed as a parameter.
$.modal(data)
. The data parameter is required and an optional options object can be passed as a second parameter. This method provides more flexibility in the types of data that are allowed. The data could be a DOM object, a jQuery object, HTML or a string.
A SimpleModal call can contain multiple elements, but only one modal dialog can be created at a time. Which means that all of the matched elements will be displayed within the modal container.
SimpleModal internally sets the CSS needed to display the modal dialog properly in all browsers, yet provides the developer with the flexibility to easily control the look and feel. The styling for SimpleModal can be done through external stylesheets, or through SimpleModal, using the overlayCss and/or containerCss options.
SimpleModal has been tested in the following browsers: