Topic: how to get node by name or id
Hi,
I need to be able to toggle selective nodes with my own javascript, I can figure out how to do node.toggle(); but how do I find the value of node. I've added an id property to each node in the same manner that the name is set, for the purpose to give each node a unique id, that I know.
My question is, how can I get a node by id or by name?
I've seen the recursive method, but it doesn't really seem like an optimal solution, as the tree will contain tens of thousands of nodes, and I need to optimise it for speed.
I'm looking for something like:
var myID = 10; //or whatever int my node id is
var node = tree.getNodeByID(myID);
node.toggle();Thanks in advance.