SimpleModal is a Mootools plugin to create simple, yet professional-looking modal windows including alerts and confirm messages with only a 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.
SIMPLEMODAL is not a lightbox although the possibility to hide parts of its layout may partially make it similar.
Content can also be retrieved via AJAX. Here’s an example below:
Snippet code Javascript:
#JS
$("myElement").addEvent("click", function(){
var SM = new SimpleModal({"width":600});
SM.addButton("Action button", "btn primary", function(){
this.hide();
});
SM.addButton("Cancel", "btn");
SM.show({
"model":"modal-ajax",
"title":"Title",
"param":{
"url":"file-content.php",
"onRequestComplete": function(){ /* Action on request complete */ }
}
});
});
Snippet code HTML:
#HTML Open Modal
- Source: http://simplemodal.plasm.it/


