This time I will share jQuery Plugin and tutorial about Customizable jQuery Modal Window Plugin – SemanticWP Modal, hope it will help you in programming stack.
Just another jQuery modal plugin helps you embed dynamic and static Html contents into a flexible, customizable and themeable modal popup windows.
Features:
- Supports remote data source via Ajax request, with an AJAX loading indicator.
- Supports long content with browser scrollbar enabled.
- Custom fullcreen overlay.
- Custom open / close animations.
- Custom modal templates.
- Press the ESC or click on the overlay to close the modal.
- Callback functions.
- 2 built-in themes: dark and light.
- Can be used to toggle the visible of your block content
How to use it:
1. Load jQuery library and the jQuery SemanticWP Modal plugin’s files in the document.
2 |
< script src = "jquery-1.11.3.min.js" ></ script > |
5 |
< script src = "path/to/jquery.semanticwp-modal.js" ></ script > |
6 |
< link rel = "stylesheet" href = "path/to/jquery.semanticwp-modal.css" > |
2. Load a theme CSS of your choice into the document.
1 |
< link rel = "stylesheet" href = "path/to/light.css" > |
3 |
< link rel = "stylesheet" href = "path/to/dark.css" > |
3. Create a basic modal window triggered by an inline element.
1 |
< span id = "#example1" onclick = "$('#exampleModal1').swpmodal()" >Basic Demo</ span > |
3 |
< div class = "box-modal" id = "exampleModal1" > |
4 |
< div class = "box-modal_close swpmodal-close" >×</ div > |
5 |
Modal Content Goes Here |
4. Load an external data source into the modal window using AJAX.
3 |
url: 'ajax_example.html' |
5. Full plugin options.
16 |
closeOnOverlayClick: true , |
23 |
tpl: '<div class="swpmodal-overlay"></div>' , |
25 |
backgroundColor: '#000' , |
33 |
tpl: '<div class="swpmodal-container"><table class="swpmodal-container_i"><tr><td class="swpmodal-container_i2"></td></tr></table></div>' |
41 |
tpl: '<div class="swpmodal-error swpmodal-close"></div>' , |
42 |
autoclose_delay: 2000, |
43 |
ajax_unsuccessful_load: 'Error' |
63 |
afterLoadingOnShow: $.noop, |
Change log:
v1.0.1 (2015-05-22)
This awesome jQuery plugin is developed by vjik. For more Advanced Usages, please check the demo page or visit the official website.