iterates through opened nodes of the tree (both parent and child)
code | function | a function that needs calling for each data item |
master | object | an object that the function is applied to (this by default) |
pid | string | the parent node id. Used to iterate through a specific branch |
//iterates through all items of the tree
tree.data.eachOpen(function(obj){
console.log(obj.value)
});
//iterates through items with $parent="2"
tree.data.eachOpen(function(obj){
console.log(obj.value)
}, this, "2");
Be aware of the following issues: