1 <div class="apiDetail">
\r
3 <h2><span>Boolean</span><span class="path">treeNode.</span>isParent</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>Judge whether the node is the parent node.</p>
\r
9 <p class="highlight_red">1. When zTree initialize the node data, the node which has children is set to true, otherwise false.</p>
\r
10 <p class="highlight_red">2. When zTree initialize the node data, if set treeNode.isParent to true, the node will be set to be parent node.</p>
\r
11 <p class="highlight_red">3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.</p>
\r
14 <h3>Boolean Format</h3>
\r
16 <p> true means: the node is parent node.</p>
\r
17 <p> false means: the node is not parent node.</p>
\r
19 <h3>Examples of treeNode</h3>
\r
20 <h4>1. Judge whether the first selected node is the parent node.</h4>
\r
21 <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
\r
22 var sNodes = treeObj.getSelectedNodes();
\r
23 if (sNodes.length > 0) {
\r
24 var isParent = sNodes[0].isParent;
\r