mBox Documentation
With mBox.Notice you can show little notices to your visitors.
Show a Notice
Simply create a new instance of mBox.Notice and your notice will pop up immediately:
new mBox.Notice({ content: 'This is a default notice' });
Use the attribute type to add an icon to your notice:
new mBox.Notice({ type: 'ok', content: 'You clicked a link' });
You can also change the position to another window corner:
new mBox.Notice({ type: 'error', position: { y: 'top', x: 'right' }, content: 'An error occured' });
Change the option offset to adjust your notices position:
new mBox.Notice({ type: 'notice', offset: { y: 120, x: 60 }, content: 'This is a notice.' });
Your notices will close automatically. How long they are visible for can be set with delayClose.
new mBox.Notice({ type: 'info', delayClose: 1500, content: 'This notice will disappear in 1.5 seconds.' });
Options
In addition to mBox.Core Options you can use following options for your notices:
type: 'default', |
The type of your notice. You can use one of the following: 'ok', 'error', 'info' or 'notice' |
move: true, |
Set move to false if you don't want your notices to move into the window. |
moveDuration: 500 |
The transition duration when move is true |