Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monkeymars/simplemodal
Modal window
https://github.com/monkeymars/simplemodal
Last synced: 3 months ago
JSON representation
Modal window
- Host: GitHub
- URL: https://github.com/monkeymars/simplemodal
- Owner: monkeymars
- Fork: true (plasm/simplemodal)
- Created: 2013-01-30T09:42:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-17T07:52:37.000Z (almost 12 years ago)
- Last Synced: 2023-04-01T16:02:57.753Z (over 1 year ago)
- Language: JavaScript
- Size: 389 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
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