Skip to content

Twitter Bootstrap Modal Box as Dialog Boxes

Last updated on February 10, 2018

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

  bootbox.alert("Hello world!");

Confirm

bootbox.confirm("Are you sure?", function(result) {
 if(result) {
   // do ...
 }
}); 

Prompt

  bootbox.prompt("What is your name?", function(result) {
if (result === null) {
Example.show("Prompt dismissed");
} else {
Example.show("Hi "+result+"");
}
});

alert box

  bootbox.alert("Hello world!");

Bootbox.js CDN links

//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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments