Function()treeNode.getPreNode

Overview[ depends on jquery.ztree.core js ]

Get the treeNode's previous sibling node.

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

Function Parameter Descriptions

ReturnJSON

JSON data object of the treeNode's previous sibling node

If have not the previous node, return null.

Examples of treeNode

1. Get the first selected node's previous sibling node.

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