Function(event, treeId, treeNode)setting.callback.onExpand

Overview[ depends on jquery.ztree.core js ]

Used to capture the event when expand node.

If you set 'setting.callback.beforeExpand',and return false, zTree will not expand node, and will not trigger the 'onExpand' callback.

Default: null

Function Parameter Descriptions

eventjs event Object

event Object

treeIdString

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

treeNodeJSON

JSON data object of the node which will be expanded

Examples of setting & function

1. When expand node, alert info about 'tId' and 'name'.

function zTreeOnExpand(event, treeId, treeNode) {
    alert(treeNode.tId + ", " + treeNode.name);
};
var setting = {
	callback: {
		onExpand: zTreeOnExpand
	}
};
......