jQuery Dialog Boxes Plugin for Bootstrap - Bootbox

jQuery Dialog Boxes Plugin for Bootstrap - Bootbox
File Size: 174 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

Bootbox is a tiny jQuery plugin for creating alert, confirm and flexible dialog boxes using Twitter's bootstrap framework.

The library exposes three methods designed to mimic their native JavaScript equivalents. Their exact method signatures are flexible as each can take various parameters to customise labels and specify defaults, but they are most commonly called like so:

  • bootbox.alert(message, callback)
  • bootbox.prompt(message, callback)
  • bootbox.confirm(message, callback)

You might also like:

Basic Usage:

1. Include jQuery Library and Bootbox.js

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> 
<script src="bootbox.min.js"></script> 

2.  Include Bootstrap files

<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<script src="bootstrap.min.js"></script> 

3. Call the plugin

        $(document).on("click", ".alert", function(e) {
            bootbox.alert("jQueryScript.Net!", function() {
                console.log("Alert Callback");

4. Markup

<a class="alert" href=#>Alert!</a>

Change Log:

v3.2.0 (2013-04-09)

  • ensure onEscape handlers return callback values properly (GH-91)
  • ensure clicking close button invokes onEscape handler if present

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