The Aurora plugin - Messages in style of jQuery UI, Bootstrap, UIkit
With this plugin you can create "on the fly" beautiful messages in the style of jQuery UI, Bootstrap or UIkit. JQuery UI, Bootstrap or UIkit frameworks are not required for the plugin to work, only for message icons.
Download (version 1.2): aurora_1.2.zip
Distributed under the GNU GPLv2 license or later.
Description of methods and properties of each of them is given below.
Methods:
Aurora.message(data, selector, options); - creates a blank message without text with default settings.
Aurora.remove(selector, options); - deletes a message or all messages.
Properties of methods:
Properties of Aurora.message():
Property | Description |
---|---|
data | Array with objects. text - message text
|
selector | css-selector where to insert message. Default into <body>. Not used with option attachTo: 'window' |
options | object with options. attachTo - where to place the message. window - on top of all elements, document - into <body>.
|
Properties of Aurora.remove():
Property | Description |
---|---|
selector | css-selector, NodeList or empty value. Leave blank to delete all messages. |
options | Object with only one option - callback onRemove |
Examples
Simple demo:
Create a message and insert it into the body of the document
Aurora.message(
[
{
text: 'Test message'
}
],
document.body
);
or create an error message and insert it into <div>
Aurora.message(
[
{
text: 'Test error message',
type: 'error'
}
],
'#err'
);
<div id="err"> </div>
Other examples see in demo.