## Function(treeNode, addFlag, isSilent)zTreeObj.selectNode

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

Select a node

zTree v3.x supports select multiple nodes.

Please use zTree object to executing the method.

### Function Parameter Descriptions

#### treeNode JSON

JSON data object of the node to be selected.

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

#### addFlag Boolean

addFlag = true means: append to select node, don't affect the previously selected node, can select multiple nodes.

addFlag = false (default) means: select single node, prior the selected node is deselected.

If setting.view.selectedMulti = false, this para, this parameter is not valid, always select single node

isSilent = true means: when you select node, zTree will not scroll the node into view.

isSilent = false (default) means: when you select node, zTree will scroll the node into view.

(v3.5.23+)

#### Return none

no return value

### Exampleso of function

#### 1. Select single node which be first selected.

    var treeObj = $.fn.zTree.getZTreeObj("tree");
    var nodes = treeObj.getNodes();
    if (nodes.length>0) {
    	treeObj.selectNode(nodes[0]);
    }