Check documentation for the latest version of dhtmlxSuite onOpenStart DHTMLX Docs

onOpenStart

fires right when an item in the tree starts to open, but before this item has opened

boolean onOpenStart(string|number id,number state);
idstring|numberthe id of the node that will be opened
statenumberthe current open state of the item
booleantrue - confirms opening

Example

myTree.attachEvent("onOpenStart", function(id, state){
    // your code here
});

Details

The event is also available for "non-closable" nodes and for the nodes without the open/close functionality. In that case the function's result will be ignored.

The "state" parameter's values:

  • 0 - item has no child nodes
  • -1 - item is closed
  • 1 - item is opened
Back to top