DHTMLX Docs & Samples Explorer

Events Handling

The following events are available in dhtmlxAccordion:

  • onActive - occurs when the user clicks the left mouse button on item's heading;
  • onBeforeActive - occurs when the user clicks on an item but before this item becomes active and opens;
  • onDock - occurs when the window docked into the accordion;
  • onUnDock - occurs when the accordion's cell undocked into the windows.

Attaching Event Handler

The user can add any user-defined handler to any of the available events. To do this the user can use attachEvent() method with the following parameters:

  • evName - name of the event;
  • evHandler - user-defined event handler.
    dxhAccord.attachEvent(evName, evHandler);

Note: the names of the events are case-insensitive.