🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Bootstrap.alert is a jQuery plugin for generating highly customizable Bootstrap based alert / confirm modal windows to replace the default JavaScript popup boxes.

Modal Bootstrap alert confirm

Documentation

Readme

Install

bower install bootstrap-alert

Include in HTML

<script type="text/javascript" src="bootstrap.alert.js">

Dependancies

<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.css" > <link rel="stylesheet" type="text/css" href="bower_components/timecircles/inc/TimeCircles.css" > <script type="text/javascript" src="bower_components/jquery/dist/jquery.js" > <script type="text/javascript" src="bower_components/bootstrap/dist/js/bootstrap.js" > <script type="text/javascript" src="bower_components/timecircles/inc/TimeCircles.js" > <script type="text/javascript" src="bower_components/underscore/underscore.js" >

How to use it

Quick Start

For use this plugin you just need to call him whith

$.alert(options);

Options

Options is an object and can have the following properties:

  • title: Modal title
  • body: Modal body text,
  • is_delayed: Did add a timer to the modal for close it?
  • close_after_calback_confirm: Did the modal close after click on confirm message?
  • close_after_calback_decline: Did the modal close after click on decline message?
  • callback_confirm: Function to call after click on confirm message
  • callback_decline: Function to call after click on decline message
  • text_confirm: Text to display on confirm button
  • text_decline: Text to display on decline button
  • extra_class: You can add your own class for customize your modal
  • timer_modal: The time of the timer if the is_delayed is true
  • click_outside_for_close: Did we close the modal if we click everywhere outside the modal?
  • type: Can be sucess, info, warning, danger or empty for change modal aspect (bootstrap class)

If no properties are pass to the plugin then it wiell start with defaut options

Additionnal information

You can make a modal with only on button (text_confirm text_decline) if none of this buttons have text then the text-confirm will be automaticaly seted

You can't pop several modal


You May Also Like