Sweet Alert

Sweet Alert
An awesome replacement for JavaScript's alert.

SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. It's even highly customizeable, as you can see below! http://t4t5.github.io/sweetalert/

A basic sweetalert message

A success message!

A warning message, with a function attached to the "Confirm"-button...

... and by passing a parameter, you can execute something else for "Cancel".

You can easy add sweet alert in your script by adding code (example from warning button):

$('.demo3').click(function () {    swal({        title: "Are you sure?",        text: "You will not be able to recover this imaginary file!",        type: "warning",        showCancelButton: true,        confirmButtonColor: "#DD6B55",        confirmButtonText: "Yes, delete it!",        closeOnConfirm: false    }, function () {        swal("Deleted!", "Your imaginary file has been deleted.", "success");    });});