Added: New (optional) parameter timeout. Timeout in seconds. After the timeout has elapsed the message box will be automatically closed.
Added: New (optional) parameter callback. Executes a callback function after the timeout has elapsed.
Changed: The message text also accepts a string instead of an array
Usage examples
Passing 'Hello' as string instead of an array is now also possible:
Code: Select all
nuMessage('Hello');
Code: Select all
nuMessage(['Hello']);
Code: Select all
nuMessage('Hello', 2000);
Code: Select all
function messageClosed() {
nuOpenPreviousBreadcrumb(); // return to the previous Breadcrumb
}
nuMessage('Hello', 1500, messageClosed);