1. Introduction
boot4alert is a jQuery plugin designed to create Bootstrap 4 modals on demand. This plugin is very light and easy to use. boot4alert can be used to create an alert or confirm message with Bootstrap 4 modals. We can provide the title and content of the popup, programmatically in JavaScript code.
2. Plugin Overview
Library | boot4alert.js |
Author | Chanchai jeimvijack |
Licence | MIT Licence |
Repository | GitHub |
Dependencies | jQuery 3.3.1 and Bootstrap 4.2 |
3. How to install and use boot4alert jQuery plugin
Follow these steps in order to install boot4alert jQuery plugin.
1. Load jQuery library into your HTML page:
2. Include all Bootstrap 4 assets (CSS file and JavaScript):
3. Include boot4alert script:
4. To programmatically show bootstrap modal use boot4.alert() function:
for confirmation popup use boot4.confirm() method:
4. Conclusion
In this article, we focused on boot4alert jQuery plugin that lets you open bootstrap modal programmatically with title and content provided in JavaScript code. This library should be useful in dynamic web applications where modal content is not constant.
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}