There are the following available events in dhtmlxMenu:
onClick - occurs when the user clicks the left mouse button on an enabled, not complex menu item;
onTouch - occurs when the user first hovers over any menu item by a mouse cursor (is not applicable for the contextual menu);
-
-
onXLS - occurs before data loading from
XML has started;
onXLE - occurs after data loading from
XML has finished;
onBeforeContextMenu - occurs before the moment when a contextual menu appears (can be used only for a contextual menu);
onAfterContextMenu - occurs after the moment when a contextual menu appears (can be used only for a contextual menu).
The user can add any user-defined handler to available events.
To do this, he can use attachEvent() method with the following parameters:
menu.attachEvent(evName, evHandler);
Note: the names of the events are case-insensitive.