🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Bootstrap-popup is a jQuery plugin that helps you create custom toast, confirmation, prompt dialog boxes using Bootstrap modal component.

Modal Bootstrap confirm popup prompt

Documentation

bootstrap-popup

A enhanced window popup widget based on twitter bootstrap modal.


##Usage

First of all, you should import bootstrap-popup, which is dependent on jquery and bootstrap.js:

<script src="//cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script> <script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <script src="dist/bootstrap-popup.min.js"></script>

Toast

此处输入图片的描述

$.bs.popup.toast(opts, callback);

$.bs.popup.toast({     title: 'Title',     info: 'This is a toast.' }, function(dialogE) {     // todos here });

Confirm

此处输入图片的描述

$.bs.popup.confirm(opts, callback);

$.bs.popup.confirm({     title: 'Title',     info: 'Do you want to confirm?' }, function(dialogE) {     // todos here });

Prompt

此处输入图片的描述

$.bs.popup.prompt(opts, callback);

$.bs.popup.prompt({     title: 'Title',     info: 'Input your name, please.' }, function(dialogE, message) {     // todos here });

Custom

此处输入图片的描述

$.bs.popup.custom(opts, callback);

$.bs.popup.custom({     title: 'Title',     dom: '<div class="custom"><h1>This is a custom DOM.</h1></div>',     width: '200px' }, function(dialogE) {     // todos here });

Documents

For more usage, please check bootstrap-popup.html.


You May Also Like