eachSubItem
iterates through all children (of any level) of the specified branch
void eachSubItem(string pid,function code);
| pid | string | the parent (branch) id |
| code | function | a 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
Join Our Forum
We've retired comments here. Visit our forum for faster technical support,
connect with other developers, and share your feedback there.