Bootstrap Alert Confirm Modal Plugin With jQuery - Download Bootstrap Alert / Confirm Modal Plugin With jQuery

Download Bootstrap Alert / Confirm Modal Plugin With jQuery

Posted on

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 Confirm Modal Plugin With jQuery - Download Bootstrap Alert / Confirm Modal Plugin With jQuery
File Size: 27.6 KB
Views Total: 2527
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   



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">
3  
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.

1 $.alert({
2   title: 'Modal Title'
3   body: 'Modal Content'
4 });

4. Customize the plugin with the following options.

01 $.alert({
02  
03   // modal title
04   title: '',
05  
06   // modal content
07   body: '',
08  
09   // display a close timer
10   is_delayed: true,
11  
12   // close modal after confirm
13   close_after_calback_confirm: true,
14  
15   // close modal after decline
16   close_after_calback_decline: true,
17  
18   // callbacks
19   callback_confirm: function(){console.log('accepted');},
20   callback_decline: function(){console.log('declined');},
21  
22   // text for confirm button
23   text_confirm: 'ok',
24  
25   // text for decline button
26   text_decline: null,
27  
28   // extra CSS class
29   extra_class: '',
30  
31   // default time of the timer
32   timer_modal: 50,
33  
34   // close modal if click outside
35   click_outside_for_close: true,
36  
37   // can be sucess, info, warning, danger or empty
38   type: '',  
39  
40 });

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




source : jqueryscript.net