SimpleModal 1.0
SIMPLE MODAL is a small plugin to create modal windows. 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.
Details
- Author
- Marco Dell'Anna
- Current version
- 1.0
- GitHub
- plasm/simplemodal
- Downloads
- 2762
- Category
- Interface
- Tags
- Report
- GitHub Issues
How to use
Minimal configuration
Http Simplemodal Plasm It

Alert Integration
Snippet code Javascript:
$("myElement").addEvent("click", function(){
var SM = new SimpleModal({"btn_ok":"Alert button"});
SM.show({
"title":"Title",
"contents":"Your message..."
});
});
Snippet code HTML:
<a id="myElement" href="javascript;">Alert</a>
Modal Ajax Integration
Snippet code Javascript:
$("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:
<a id="myElement" href="javascript;">Open Modal</a>
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus