DHTMLX Docs & Samples Explorer

attachEvent(original, catcher, CallObj)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxaccordion.js

attaches an event handler to accordion

  • original - event's original name;
  • catcher - event handler;
  • CallObj - object that will call the event.

You can attach several handlers to the same event, and all of them will be executed.

 
Event names are case-insensitive.

dhxAcc.attachEvent("onActive", function(item){
   // code here
});
   // or
function doOnActive(item){
   // code here
});
dhxAcc.attachEvent("onActive", doOnActive);