SimpleModal - Beautiful Popup Window Plugin

SimpleModal - Beautiful Popup Window Plugin
File Size: 339 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

SimpleModal is a Beautiful and easy-to-use Popup Window Plugin for creating modal windows used to generate alert or confirm messages.

There are 4 ways to create Popup Window:

1. ALERT INTEGRATION

$("myElement").addEvent("click", function(){
  var SM = new SimpleModal({"btn_ok":"Alert button"});
      SM.show({
        "title":"Title",
        "contents":"Your message..."
      });
});

2.MODAL INTEGRATION

$("myElement").addEvent("click", function(){
  var SM = new SimpleModal({"btn_ok":"Confirm button"});
      SM.addButton("Action button", "btn primary", function(){
        alert("Add your code");
        this.hide();
      });
      SM.addButton("Cancel", "btn");
      SM.show({
        "model":"modal",
        "title":"Title",
        "contents":"Your message..."
      }); 
});

3.MODAL-AJAX INTEGRATION

$("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":"ajax-content.php",
          "onRequestComplete": function(){ /* Action on request complete */ }
        }
      });
});

4.MODAL-IMAGE

$("myElement").addEvent("click", function(){
  var SM = new SimpleModal();
      SM.show({
        "model":"modal-ajax",
        "title":"Image title",
        "param":{
          "url":"http://url-file.jpg",
          "onRequestComplete": function(){ }
        }
      });
});

This awesome jQuery plugin is developed by unknown. For more Advanced Usages, please check the demo page or visit the official website.