ztree刷新父节点及刷新当前节点函数

//刷新父节点
function rereshParentNode(id){
	var treeObj = $.fn.zTree.getZTreeObj("tree");
	var nownode = treeObj.getNodesByParam("id", id, null);
	var parent=nownode[0].getParentNode();
	treeObj.reAsyncChildNodes(parent, "refresh");
}

//刷新当前节点
function rereshNode(id){
	var treeObj = $.fn.zTree.getZTreeObj("tree");
	var nownode = treeObj.getNodesByParam("id", id, null);
	treeObj.reAsyncChildNodes(nownode[0], "refresh");
}

 

你可能感兴趣的:(ztree)