jQuery Plugin to push notifications on your webpages
Developed by Arun Thomas
www.ajarunthomas.com
Demo
Download
Website
<script type="text/javascript" src="js/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="js/notifier.js"></script>
$(window).load(function(){
$.notifier({
"message":"Enter your notification message here", //content to be shown in the notification bar
"color1":"white", //background color of the notification bar
"color2":"black", //color of the text
"closeButton":"text", //shows a textual close button rather than a cross sign button.
"delay":3 //when to show the notification from trigger point (in seconds)
});
});
The above example will show the notification 3 seconds after the webpage has loaded. If you want to trigger the notification on button click, then include the initialization code inside the click method.
$(document).ready(function() {
$('#myDiv').click(function(){
$.notifier({
"message":"this is your notification"
});
});
});
If you want to include an image in the notification, then insert the img tag in the message area.
$.notifier({
"message":"<img src='images/picture.jpg' />"
});