## Function(expandFlag)zTreeObj.expandAll

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

Expand or collapse all nodes.

This method does not trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function.

Please use zTree object to executing the method.

### Function Parameter Descriptions

#### expandFlagBoolean

expandFlag = true means: expand all nodes.

expandFlag = false means: collapse all nodes.

#### Return Boolean

return the result of expand or collapse.

true means: expand all nodes

false means: collapse all nodes

null means: have no parent node to expand or collapse.

### Examples of function

#### 1. Expand all nodes

    var treeObj = $.fn.zTree.getZTreeObj("tree");
    treeObj.expandAll(true);