1 <div class="apiDetail">
\r
3 <h2><span>Array(JSON)</span><span class="path">treeNode.</span>children</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>The data collections of node's child nodes.</p>
\r
9 <p class="highlight_red">1. If change the 'children' to other attribute, please set the 'setting.data.key.children' attribute.</p>
\r
10 <p class="highlight_red">2. If you set to use dynamic tree, when a node is expanded which 'isParent' attribute is true and which has no child nodes, zTree will use ajax to get its child nodes.</p>
\r
11 <p>Default: undefined</p>
\r
14 <h3>Array(JSON) Format</h3>
\r
16 <p>Standard JSON Data object</p>
\r
18 <h3>Examples of treeNode</h3>
\r
19 <h4>1. Use the standard JSON data object.</h4>
\r
20 <pre xmlns=""><code>var nodes = [
\r
21 { "id":1, "name":"test1",
\r
23 { "id":3, "name":"test3"},
\r
24 { "id":4, "name":"test4"},
\r
25 { "id":5, "name":"test5"}
\r
28 { "id":2, "name":"test2" }
\r
30 <h4>2. Get the first root node's child nodes</h4>
\r
31 <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
\r
32 var nodes = treeObj.getNodes()[0].children;
\r