Bootbox.js is a small JavaScript library which allows you to create programmatic dialog boxes using Bootstrap modals, without having to worry about creating, managing or removing any of the required DOM elements or JS event handlers.
Here are the simplest possible example:
alert box
1 |
bootbox.alert("Hello world!"); |
Confirm
1 2 3 4 5 |
bootbox.confirm("Are you sure?", function(result) { if(result) { // do ... } }); |
Prompt
1 2 3 4 5 6 7 |
bootbox.prompt("What is your name?", function(result) { if (result === null) { Example.show("Prompt dismissed"); } else { Example.show("Hi <b>"+result+"</b>"); } }); |
alert box
1 |
bootbox.alert("Hello world!"); |
Bootbox.js CDN links
1 2 3 4 |
//cdn.jsdelivr.net/bootbox/4.2.0/bootbox.js //cdn.jsdelivr.net/bootbox/4.2.0/bootbox.min.js //cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.2.0/bootbox.min.js |
Fore More available options please visit : http://bootboxjs.com/documentation.html