Download eAlert zipped file. Main files are found in the "src" folder.
Your application must have jQuery.
The simplest way to use eAlert is to include the minified script:
<link rel="stylesheet" href="https://YOUR-APPLICATION-DIRECTORY/ealert.min.css"></script>
Show an info alert
ealert.fire('info','This is my alert message');
Show a success alert
ealert.fire('success','This is my alert message');
Show a danger alert
ealert.fire('danger','This is my alert message');
Change display duration
The default duration is 3 seconds. This can be changed using:
ealert.duration = 5000 //5 seconds
The default position is "bottom" which will show the alert at the bottom center of the page. This can be changed using:
ealert.position = "top left"
Available options include:
You can combine multiple positions such as "bottom left","bottom right", "top left","top right". When you use "bottom" only, the alert is shown at bottom center of the page and when you use "top" only, the alert is shown at the top center of the page.