/ Modal Dialog

jQuery plugin to create modal windows

jQuery plugin to create modal windows

Modal - A simple modal window

SIMPLE MODAL is a small plugin for jQuery to create modal windows. It's heavily based on SIMPLE MODAL for Mootools It can be used to generate alert or confirm messages with few lines of code. Confirm configuration involves the use of callbacks to be applied to affirmative action; it can work in asynchronous mode and retrieve content from external pages or getting the inline content. SIMPLE MODAL is not a lightbox although the possibility to hide parts of its layout may partially make it similar.

How to Use

Minimal configuration


Snippet code Javascript:

	$("#myElement").click(function() {
                btnOk:    "Alert button",
                title:    "Title",
	            contents: "Your message..."

Snippet code HTML:

	<a id="myElement" href="javascript;">Alert</a>


Snippet code Javascript:

	$("#myElement").click(function() {
            model: "modal-ajax",
            title: "Title",
            param: {
                url: "file-content.php",
                onRequestComplete: function() { /* Action on request complete */ }
        }.addButton("Action button", "btn primary", function() {
        }).addButton("Cancel", "btn").showModal();

Snippet code HTML:

	<a id="myElement" href="javascript;">Open Modal</a>


Michał Buczko



A Nice collection of often useful examples done in HTML JavaScript CSS.

Read More