## Function(treeId)$.fn.zTree.destroy

### Overview[ depends on jquery.ztree.core js ]

From zTree v3.4, zTree provides a method for destruction.

1. This method can destroy a zTree by treeId, or destroy all zTree instances.

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

3. If you want to re-use the tree which has been destroyed, you must first re-initialise it with the 'init()' method.

### Function Parameter Descriptions

#### treeIdString

zTree unique identifier

If this parameter is omitted, all zTree instances will be destroyed.

#### Return none

no return value

### Examples of function

#### 1. Destroy the zTree with id === 'treeDemo'

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

#### 2. Destroy all zTree instances

    $.fn.zTree.destroy();