Function(treeId)$.fn.zTree.destroy

Overview[ depends on jquery.ztree.core js ]

From zTree v3.4, zTree support the method for destruction.

1. This method can destroy the zTree with specify treeId, and can destroy all of the zTrees.

2. If you want to destory some one zTree, you can use the 'zTreeObj.destroy()' method.

3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.

Function Parameter Descriptions

treeIdString

zTree unique identifier

If this parameter is omitted, then will destroy all of the zTrees.

Return none

no return value

Examples of function

1. destroy the zTree which its id is 'treeDemo'

$.fn.zTree.destroy("treeDemo");

2. destroy all of the zTrees

$.fn.zTree.destroy();