## Function(treeNode, callbackFlag)zTreeObj.removeNode

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

Remove a node

Use removeNode() method of zTree v3.x can trigger 'beforeRemove / onRemove' callback function. for reduce redundant code.

Please use zTree object to executing the method.

### Function Parameter Descriptions

#### treeNode JSON

JSON data object of the node which will be removed.

Please ensure that this data object is an internal node data object in zTree.

#### callbackFlag Boolean

callbackFlag = true means: call this method, will trigger 'beforeRemove' & 'onRemove' callback.

callbackFlag = false means: call this method, will not trigger callback.

If this parameter is omitted, it is same as 'callbackFlag = false'

#### Return none

no return value

### Examples of function

#### 1. Remove all of the selected nodes.

    var treeObj = $.fn.zTree.getZTreeObj("tree");
    var nodes = treeObj.getSelectedNodes();
    for (var i=0, l=nodes.length; i < l; i++) {
    	treeObj.removeNode(nodes[i]);
    }