This is a reimplementation of the browser popups: alert, confirm and prompt, using bootstrap modals.
Instructions for using:
- Add a link to the js and css file in your html:
<script src="/bower_components/boopup/dist/boopup.js"></script>
<link rel="stylesheet" href="bower_components/boopup/dist/boopup.min.css"/>
Warning: this will append the bootstrap modals to your body!
- Use the global variable Boopup:
Boopup.alert("This is a boopup alert!");
Boopup.confirm("This is a boopup confirm!", function(agree) {
console.log(agree);
})
Boopup.prompt("This is a boopup prompt!", function(input) {
console.log(input);
})
Bootstrap and jquery must already be loaded. You can customize the css by overriding boopup.min.css classes.