Function()treeNode.getParentNode

Overview[ depends on jquery.ztree.core js ]

Get the treeNode's parent node.

Do not initialize or modify it, it is created by the zTree.

Function Parameter Descriptions

ReturnJSON

JSON data object of treeNode's parent node.

If treeNode is root, return null.

Examples of treeNode

1. Get the first selected node's parent node.

var treeObj = $.fn.zTree.getZTreeObj("tree");
var sNodes = treeObj.getSelectedNodes();
if (sNodes.length > 0) {
	var node = sNodes[0].getParentNode();
}