jQuery.msgbox is a lightweight jQuery plugin allowing you to append or prepend temporary messages to a box.
1.0
- Include
jquery.msgbox.js
in your scripts after jquery.
Enable the plugin on your selector by using the method :
$('#selector').msgbox()
lines
must be an int. It's the maximum number of lines the box will display at a time.
timer
must be an int. It's the number of milliseconds a message will appear. Can be set to null for unlimited display.
direction
must be a string, either append
or prepend
. The add
method will use this direction.
onComplete
is an optional callback called after the initialization.
animate
is a boolean. When set to true, elements will fade out instead of just disappearing.
Append or prepend a messageto the box and use an optional callback
$('#selector').msgbox('add', 'message', callback)
Prepend an element and allows a callback.
$('#selector').msgbox('prepend', 'message', callback)
Append an element and allows a callback.
$('#selector').msgbox('append', 'message', callback)
Empty the box and remove listeners `$('#selector').msgbox('empty');
Destroy the instance of msgbox then use an optional callback `$('#selector').msgbox('destroy', callback);
Return to the initial state `$('#selector').msgbox('reset');