[Improved] nuMessage()
Posted: Sat Mar 20, 2021 11:35 am
Improved nuMessage() in V.4.5-2021.03.20.00 (Github)
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:
Previoulsy:
Close the message box after 2 seconds:
Close the message box after 1.5 seconds and call the callback function messageClosed();
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);