Search...
onClose( )
Adds an event handler that is triggered when the menu container is closed.
Description
Adds an event handler that is triggered when the hamburger menu container is closed.
Syntax
function onClose(handler: EventHandler): voidhandler: function EventHandler(event: Event): void
onClose Parameters
NAME
TYPE
DESCRIPTION
handler
The name of the function or the function expression to run when the element is closed.
Returns
This function does not return anything.
Return Type:
void
EventHandler Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Adds an event handler that runs when the menu container is closed
Copy Code
1$w("#myMenuContainer").onClose((event) => {2 let targetId = event.target.id; // "myMenuContainer"3});