1 <div class="apiDetail">
\r
3 <h2><span>Function()</span><span class="path">treeNode.</span>getParentNode</h2>
\r
4 <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
\r
7 <div class="longdesc">
\r
8 <p>Get the treeNode's parent node.</p>
\r
9 <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
\r
12 <h3>Function Parameter Descriptions</h3>
\r
14 <h4><b>Return</b><span>JSON</span></h4>
\r
15 <p>JSON data object of treeNode's parent node.</p>
\r
16 <p class="highlight_red">If treeNode is root, return null.</p>
\r
18 <h3>Examples of treeNode</h3>
\r
19 <h4>1. Get the first selected node's parent node.</h4>
\r
20 <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
\r
21 var sNodes = treeObj.getSelectedNodes();
\r
22 if (sNodes.length > 0) {
\r
23 var node = sNodes[0].getParentNode();
\r