jQuery BootAlert – A Simple Bootstrap Alert Function

Did anyone miss a javascript function that can show a modal box based on Twitter Bootstrap css library that also can inject contents to the alert box dynamically whenever require ?

Well, I did. I was writing some ajax calls to post some data to an php file and show the output received. One solution came to my mind was the jQuery Apprise plugin. I used this plugin in some of my projects. It’s pretty good.

However, the current project was heavily using the Twitter Bootstrap framework so to match with the current theme, bootstrap modal is what I preferred.

This simple jQuery function will inject a bootstrap modal window to the page and show the message that we want the user to see. The script was developed in hurry for a project so just the basic functionality is included. I plan to extend this code snippet soon when I get free time.


View Demo of BootAlert

Download the source code at BitBucket
View project at BitBucket

3 thoughts on “jQuery BootAlert – A Simple Bootstrap Alert Function

Leave a Reply

Your email address will not be published.