Documentation
Events
A Polipop instance dispatches the following events:
ready
A callback function invoked immediately after the wrapper element has been rendered into the DOM.
var polipop = new Polipop('polipop', {
ready: function () {
...
},
});
add
A callback function invoked immediately after a notification object has been added into the queue. Accepts the argument:
{Object} notification- A notification object.
var polipop = new Polipop('polipop', {
add: function (notification) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
add: function (notification) {
...
}
});
beforeOpen
A callback function invoked immediately before a notification element has been rendered into the DOM. Accepts the arguments:
{Object} notification- A notification object.{Element} element- A notification element.
var polipop = new Polipop('polipop', {
beforeOpen: function (notification, element) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
beforeOpen: function (notification, element) {
...
}
});
open
A callback function invoked immediately after a notification element has been rendered into the DOM but before the element's opening animation has started. Accepts the arguments:
{Object} notification- A notification object.{Element} element- A notification element.
var polipop = new Polipop('polipop', {
open: function (notification, element) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
open: function (notification, element) {
...
}
});
afterOpen
A callback function invoked immediately after a notification element has been rendered into the DOM and the element's animation has finished. Accepts the arguments:
{Object} notification- A notification object.{Element} element- A notification element.
var polipop = new Polipop('polipop', {
afterOpen: function (notification, element) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
afterOpen: function (notification, element) {
...
}
});
beforeClose
A callback function invoked immediately after the Polipop.beforeClose event has been triggered on an element but before the element's closing animation has started. Accepts the arguments:
{Object} notification- A notification object.{Element} element- A notification element.
var polipop = new Polipop('polipop', {
beforeClose: function (notification, element) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
beforeClose: function (notification, element) {
...
}
});
close
A callback function invoked immediately after the element's closing animation has finished, immediately before the element has been removed from the DOM. Accepts the arguments:
{Object} notification- A notification object.{Element} element- A notification element.
var polipop = new Polipop('polipop', {
close: function (notification, element) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
close: function (notification, element) {
...
}
});
click
A callback function invoked immediately after a notification element has been clicked. Accepts the arguments:
{MouseEvent} event- The click event.{Object} notification- A notification object.{Element} element- A notification element.
var polipop = new Polipop('polipop', {
click: function (event, notification, element) {
...
}
});
polipop.add({
type: 'success',
title: 'Message',
content: 'This is the message content.',
click: function (event, notification, element) {
...
}
});