This time I will share jQuery Plugin and tutorial about Simple Inline Confirm Button Plugin With jQuery And Bootstrap, hope it will help you in programming stack.
A jQuery / Bootstrap plugin that provides an inline confirmation on buttons to confirm some actions without having to mess with JS dialog.
How to use it:
1. Load the necessary jQuery library and Bootstrap framework in your html file.
1 |
< script src = "/path/to/jquery.min.js" ></ script > |
2 |
< link rel = "stylesheet" href = "/path/to/bootstrap.min.css" > |
3 |
< script src = "/path/to/bootstrap.min.js" ></ script > |
2. Load the Bootstrap Confirm Button plugin’s script after jQuery.
1 |
< script src = "bootstrap-confirm-button.src.js" ></ script > |
3. Create a confirm button on the webpage.
1 |
< a class = "btn btn-default btn-del" >Delete An Item</ a > |
4. Call the function on the button, specify the custom confirmation message and custom action you want to perform.
1 |
$( '.btn-del' ).btsConfirmButton( "Delete this item Now!" , function (e) { |
5. All default options.
01 |
$( '.btn-del' ).btsConfirmButton({ |
07 |
className: 'btn-danger', |
Change log:
2018-04-03
2018-03-31
2017-08-08
- JS update
- Remove console log
This awesome jQuery plugin is developed by stefanocudini. For more Advanced Usages, please check the demo page or visit the official website.