## Function(treeId, treeNode)setting.callback.beforeCollapse

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

Used to capture the event before collapse node, zTree based on return value to determine whether to collapse node.

Default: null

### Function Parameter Descriptions

#### treeId String

zTree unique identifier: treeId, easy for users to control.

#### treeNode JSON

JSON data object of the node which will be collapsed

#### Return Boolean

return true or false

If return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.

### Examples of setting & function

#### 1. disabled to collapse node which is expanded

    function zTreeBeforeCollapse(treeId, treeNode) {
        return false;
    };
    var setting = {
    	callback: {
    		beforeCollapse: zTreeBeforeCollapse
    	}
    };
    ......