Notifier is a tool that offers a nice and elegant way to add informational notifications on your webpages.
To get started, download the plugin, unzip it and copy files to your website/application directory. Load files in the section of your HTML document. Make sure you also add the jQuery 2.x library.
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="/notifier/jquery.notifier.css" />
<script type="text/javascript" src="/notifier/jquery.notifier.js"></script>
</head>
Create notification window like this:
$.notify({
'message': 'Your message here'
});
May also be passed an optional options object which will extend the default values. Example:
$.notify({
'vertical-align': 'bottom',
'align': 'right',
'hide-interval' : 2000,
'message': 'Your message here',
'afterClosed': function() {
// Put your function here
},
'afterShowed': function() {
// Put your function here
}
});
Vertical position of notification window. Can be 'top', 'middle' or 'bottom'.
Horizontal position of notification window. Can be 'left', 'center' or 'right'.
Amount of milliseconds after which notification window will disappear. If set to 0, notification window will disappear only after manual closing.
Message that will be shown in notification window
Event driven callback method, that occurs after notification window are showed on screen.
Event driven callback method, that occurs after notification window are disappeared from screen.