iterates through the collection of tree data items
code | function | a function that needs calling for each data item |
master | object | an object that the function is applied to (this by default) |
all | boolean | if true, hidden (as well as hidden by filtering) items are iterated |
pid | string | the parent node id. Used to iterate through a specific branch |
//iterates through all items of the tree
tree.data.each(
function(obj){
console.log(obj.value)
}
);
//iterates through items with $parent="1.2"
tree.data.each(
function(obj){
console.log(obj.value)
}, this, true, "1.2");
Note that