calls treeview function w/o triggering events
callback | function | user-defined function |
myTreeView.attachEvent("onSelect", function(id, state){
console.log(id, state);
});
myTreeView.selectItem("1"); // trigger event
myTreeView.selectItem("2"); // trigger event
myTreeView.silent(function(){
myTreeView.selectItem("3"); // do not trigger event
myTreeView.selectItem("4"); // do not trigger event
});
myTreeView.selectItem("5"); // trigger event
// console output
1 true
1 false
2 true
4 false
5 true
Back to top