Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 563 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 563 Bytes

js-alert

Overriding default alert()

Demo

See it in action: JS Alert Demo

How it works

Add this code after js-alert.js

// Setting options
alert.options = {
    'bootstrap': false // true if you use Bootstrap
};

Then you can call alert() at anytime as:

$(function (){
    $('#jsalert').on('click', function (e){
        e.preventDefault();
        alert($('#alert_message').val());
    });
});

In this example, I am using Bootstrap for CSS