Function(treeId, treeNode)setting.callback.beforeMouseDown

Overview[ depends on jquery.ztree.core js ]

Used to capture the mousedown event before the 'onMouseDown' callback, zTree based on return value to determine whether to trigger the 'onMouseDown' callback.

Default: null

Function Parameter Descriptions

treeIdString

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

treeNodeJSON

JSON data object of the node which mouse over

If the DOM which mouse over isn't a node, it will return null.

Return Boolean

return true or false

If return false, zTree will not trigger the 'onMouseDown' callback, no effect on other operations.

Examples of setting & function

1. disable to trigger the 'onMouseDown' callback

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