Notifier

Unobtrusive notification messages can be used to give feedback to users.
Looking for a commercial license ? Keep your source code proprietary and Buy a Commercial License Today!

All of AlertifyJS animation/transition effects are disabled due to user preference that the system minimizes the amount of animation or motion it uses. See prefers-reduced-motion CSS media feature.

notify ( message, type, wait, callback )


Description: Creates a new notification message.

Parameters:

@message {String or DOMElement} Message content

@type {String} Type of the notification message (CSS class name 'ajs-{type}' to be added)

@wait {Number} Time (in seconds) to wait before the message is dismissed, a value of 0 means keep open till clicked.

@callback {Function} A callback function to be invoked when the message is dismissed.

 //using custom CSS
 // .ajs-message.ajs-custom { color: #31708f;  background-color: #d9edf7;  border-color: #31708f; }
 alertify.notify('custom message.', 'custom', 2, function(){console.log('dismissed');});