Coder Social home page Coder Social logo

bherbulot / bootstrap.alert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netsach/bootstrap.alert

0.0 3.0 0.0 146 KB

Customizable bootstrap alert : Replace old javascript alert('msg');

License: GNU General Public License v3.0

JavaScript 63.71% HTML 36.29%

bootstrap.alert's Introduction

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

bootstrap.alert's People

Contributors

bherbulot avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.