Dalert is a simple jQuery and jQuery UI plugin that easily creates a customizable alert (or confirm) window as a replacement for the native javascript alert and confirm methods. Dependencies : jQuery, jQuery UI
- Homepage & Documentation: [http://andrewdex.github.io/dalert]
//Dalert Alert Dialog
dalert.alert("I am a little DAlert !");
//Dalert With Callback
//Start :: DAlert Alert Usage with a callback on close of the alert
dalert.alert("Hello, I am a DAlert!", "Title", function callbackMe(){
dalert.alert("Me callback !");
});
//End :: DAlert Alert Callback Usage
//Dalert Confirm Dialog
dalert.alert("Are you sure?", "Confirm Title" , function (result) {
if (result) {
dalert.alert("Clicked yes"); // If yes clicked
} else {
dalert.alert("Clicked no"); // If no clicked
}
});
//Dalert Replace Native Alert
dalert.ReplaceAlert();
//Dalert Replace Native Confirm
dalert.ReplaceConfirm();
Download the latest release or clone the repo, git clone git://github.com/andrewdex/dalert.git
.
If you have node installed, install GruntJS Globaly and cd into the dalert directory then use
npm install
To generate the minified file, type
grunt