Function(treeId, treeNode)setting.view.removeHoverDom

Overview[ depends on jquery.ztree.exedit js ]

Used to hide custom control when mouse move out the node. (e.g. the rename and remove button)

If you use this function, so must set setting.view.addHoverDom, please make sure that a better understanding of zTree before you use it.

Default: null

Function Parameter Descriptions

treeIdString

zTree unique identifier: treeId.

treeNodeJSON

JSON data object of the node which need to hide the custom control.

Examples of setting & function

1. Display a button when mouse move over the node, and hide the button when mouse move out.

var setting = {
	view: {
		addHoverDom: addHoverDom,
		removeHoverDom: removeHoverDom,
		......
	}
};
function addHoverDom(treeId, treeNode) {
	var aObj = $("#" + treeNode.tId + "_a");
	if ($("#diyBtn_"+treeNode.id).length>0) return;
	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
	aObj.append(editStr);
	var btn = $("#diyBtn_"+treeNode.id);
	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
};
function removeHoverDom(treeId, treeNode) {
	$("#diyBtn_"+treeNode.id).unbind().remove();
	$("#diyBtn_space_" +treeNode.id).unbind().remove();
};
......