Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plasm/simplemodal
Modal window
https://github.com/plasm/simplemodal
Last synced: 18 days ago
JSON representation
Modal window
- Host: GitHub
- URL: https://github.com/plasm/simplemodal
- Owner: plasm
- Created: 2011-10-03T20:01:26.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T10:54:10.000Z (over 7 years ago)
- Last Synced: 2024-08-01T00:57:04.652Z (3 months ago)
- Language: JavaScript
- Size: 1.5 MB
- Stars: 488
- Watchers: 28
- Forks: 138
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Screenshot](https://raw.github.com/plasm/simplemodal/master/logotipo.png)
http://simplemodal.plasm.it
---------------------------
Modal - A simple modal window
===========================================
SIMPLE MODAL is a small [MooTools](http://mootools.net/) 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.How to Use
----------Minimal configuration
ALERT INTEGRATION
-----------------
Snippet code Javascript:#JS
$("myElement").addEvent("click", function(){
var SM = new SimpleModal({"btn_ok":"Alert button"});
SM.show({
"title":"Title",
"contents":"Your message..."
});
});Snippet code HTML:
#HTML
AlertMODAL-AJAX INTEGRATION
----------------------
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
LIGHTBOX SUPPORT
----------------
Automatic lightbox support: