This time I will share jQuery Plugin and tutorial about Bootstrap Alert / Confirm Modal Plugin With jQuery, hope it will help you in programming stack.
Bootstrap.alert is a jQuery plugin for generating highly customizable Bootstrap based alert / confirm modal windows to replace the default JavaScript popup boxes.
Features:
- Based on Bootstrap styles and Modal component.
- Countdown timer for confirm using TimeCircles plugin.
- Close if click outside or after confirm / decline.
- Custom modal types: basic, info, success, warning and danger.
How to use it:
1. Add jQuery, Bootstrap and other required resources into your webpage.
1 |
< link rel = "stylesheet" href = "/path/to/bootstrap.min.css" > |
2 |
< link rel = "stylesheet" href = "/path/to/TimeCircles.css" > |
4 |
< script src = "/path/to/jquery.min.js" ></ script > |
5 |
< script src = "/path/to/bootstrap.min.js" ></ script > |
6 |
< script src = "/path/to/TimeCircles.js" ></ script > |
7 |
< script src = "/path/to/underscore-min.js" ></ script > |
2. Load the jQuery Bootstrap.alert plugin after jQuery JavaScript library.
1 |
< script src = "bootstrap.alert.js" ></ script > |
3. The JavaScript to display a basic alert box on the screen.
4. Customize the plugin with the following options.
13 |
close_after_calback_confirm: true , |
16 |
close_after_calback_decline: true , |
19 |
callback_confirm: function (){console.log( 'accepted' );}, |
20 |
callback_decline: function (){console.log( 'declined' );}, |
35 |
click_outside_for_close: true , |
This awesome jQuery plugin is developed by NetSach. For more Advanced Usages, please check the demo page or visit the official website.