Add new message to the end or to the beginning depending on method parameter:
messageParameters: object parameters of message to add. Required.
method – string: (‘append’ or ‘prepend’) dictates to add new message in the end or in the beginning of messages container. Optional, if not specified, then it will add message depending on newMessagesFirst parameter
animate – boolean: (by default true) You may pass here false and message will be added immediately without any transiton and scrolling animation. Optional.
Method returns HTMLElement of added messsage
Add multiple messages per once.
Messages: array with messages to add. Each message in array should be presented as object with message parameters Required.
Method returns array of HTMLElements with added messsages
5)
myMessages.removeMessage(message);
Remove message
message: HTMLElement or string (with CSS Selector) of message element to remove. Required
Method returns true if specified message was removed
6)
myMessages.removeMessages(messages);
Remove multiple messages
messages: array (with HTMLElements) or string (with CSS Selector) of messages to remove. Required
Method returns true if specified messages was removed.
7)
myMessages.scrollMessages();
Scroll messages to top/bottom depending on newMessagesFirst parameter