This time I will share jQuery Plugin and tutorial about Simple Fast Popup Window Plugin For jQuery – simple-popup.js, hope it will help you in programming stack.
simple-popup.js is a simple, fast jQuery popup plugin which lets you create highly customizable modal pop boxes with configurable fade in/out effects.
Basic usage:
1. Include the core style sheet file jquery.simple-popup.min.css
in the header of the webpage.
1 |
< link href = "jquery.simple-popup.min.css" rel = "stylesheet" > |
2. When you don’t like inline CSS in your HTML, include this file and change all css rules to your liking. This file is used when the option “inlineCss: false” is provided in the simplePopup function.
1 |
< link href = "jquery.simple-popup.settings.css" rel = "stylesheet" > |
3. Include jQuery library and the core JavaScript file jquery.simple-popup.min.js
right before the closing body tag.
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "jquery.simple-popup.min.js" ></ script > |
4. Create a trigger link to toggle a modal popup with inline content.
2 |
data-content = "Inline Content Here" > |
1 |
$( "a.demo-1" ).simplePopup(); |
5. Create a trigger link to toggle a modal popup that loads content from a specific HTML block.
1 |
#myPopup { display : none ; } |
1 |
$( "a.demo-2" ).simplePopup({ |
3 |
htmlSelector: "#myPopup" |
6. All default configuration options for the plugin.
01 |
$( ".selector" ).simplePopup({ |
20 |
backdropBackground: "#000" , |
35 |
fadeInTimingFunction: "ease" , |
41 |
fadeOutimingFunction: "ease" , |
44 |
beforeOpen: function (){}, |
45 |
afterOpen: function (){}, |
46 |
beforeClose: function (){}, |
47 |
afterClose: function (){} |
This awesome jQuery plugin is developed by dinoqqq. For more Advanced Usages, please check the demo page or visit the official website.