getChildrenReturns: array

Return an array with the ids of all children.

Parameters

NameTypeDescription
node {Object} The node as jquery object.
cascade {Boolean} Include all nested children. Set to true by default.

Examples

Cascade True

    
 <div id="tree"></div>
 <script>
     var tree = $('#tree').tree({
         dataSource: '/Locations/Get',
         dataBound: function () {
             var node = tree.getNodeByText('North America'),
                 children = tree.getChildren(node);
             alert(children.join());
         }
     });
 </script>

  

Cascade False

    
 <div id="tree"></div>
 <script>
     var tree = $('#tree').tree({
         dataSource: '/Locations/Get',
         dataBound: function () {
             var node = tree.getNodeByText('North America'),
                 children = tree.getChildren(node, false);
             alert(children.join());
         }
     });
 </script>