eachSubItem

iterates through all children (of any level) of the specified branch

void eachSubItem(string pid,function code);
pidstringthe parent (branch) id
codefunctiona function that needs calling for each data item

Example

tree.data.eachSubItem("2", function(obj){ console.log(obj.id); });

Details

Note that

  • eachSubItem iterates through all child nodes of the branch (without the specified parent node).
  • The eachSubItem's function takes the data object as a parameter.
  • If you want to iterate only through the first-level children of a branch - use the eachChild method.
See also
Back to top