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