SimpleModal - Beautiful Popup Window Plugin

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

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(){ }
        }
      });
});

Changelog:

2014-12-30

  • Added ability to work with images without specified type.

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