Bootstrap-dialog Simple to use

Source: Internet
Author: User

Using bootstrap to achieve the effect of pop-up dialogs, we can use the bootstrap modal. However, modal is cumbersome to use and requires a large number of div codes to be written. Bootstrap-dialog a good solution to the problem.

Bootstrap-dialog's Gitlhub Address

Bootstrap-dialog Reference case

Using Boostrap-dialog is very simple,

First, introduce Boostrap-dialog.js and bootstrap-dialog.css files

Then, a simple sentence can be done.

Bootstrapdialog.alert (' I want banana! ');
Bootstrapdialog.show ({message: ' Hi apple! ') });
Bootstrapdialog.show ({title: ' Say-hello Dialog ', message: ' Hi apple! ' });

The alert and confirm hints are often used in the project, but the system comes with a particularly uncomfortable style, and we can use Bootstrap-dialog instead.

1. Alert

Bootstrapdialog.alert (' Balabalabalabalabalalba ');

2, confirm

Bootstrapdialog.confirm (' Confirm delete the currently selected record? ', function (result) {if (result) {alert (' delete '); ...            }            else {alert (' Do not delete '); }        });

3. Finally

Boostrap-dialog actually has a lot of useful functions, in particular, you can refer to Bootstrap-dialog Case


Bootstrap-dialog Simple to use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.