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.
zTree unique identifier
If this parameter is omitted, all zTree instances will be destroyed.
no return value
$.fn.zTree.destroy("treeDemo");
$.fn.zTree.destroy();