jQuery.telligent.evolution.notifications
This module adds support for showing temporary notifications in the top right of the browser's viewport. Multiple messages are stacked.
Methods
show
Shows the provided HTML message in the notifications area of the page. Returns the unique ID of the notification message.
$.telligent.evolution.notifications.show(message, options);
options:
-
duration
: the number of milliseconds to show the message. While hovered, messages stay visible even if the duration has passed.- default:
5000
- default:
-
width
: the width of the notification in pixels- default:
200
- default:
-
type
: the textual CSS message type (success, warning, error)- default:
empty
- default:
-
id
: a unique ID for the message. If one is not provided, one will be generated. IDs can passed in and re-used in order to alter the content of an already-displayed message.- default:
null
(auto-generated)
- default:
onClick
: callback called when the message is clicked. When anonClick
handler is provided, the message has an different styling when hovered overonClose
: callback called when the message is explicitly closed by the user. When onClose returns a promise, the message is not closed until the promise resolves.onShow
: callback called when the message is shownonHide
: callback called when the message disappears either automatically or explicitlyonOver
: callback called when the mouse is over the messageonOut
: callback called when the mouse leaves the message
hide
Hides a single notification message by its id
$.telligent.evolution.notifications.hide(id);
Hides all open notifications and execute a callback function
$.telligent.evolution.notifications.hide(callback);