Finds sidebar node with id and returns it or its index.
get([parent], [id], [returnIndex])
parent string, id of the parent node (optional)
id string, id of the sidebar node (optional)
returnIndex boolean, if true returns index in the nodes array (optional)
Returns object or integer or null.


The id argument is the id of the sidebar node used during its creation. Nodes can be nested. Each node has .nodes array that holds its children. If sidebar node was not found the method will return null.
You can optionally specify parent, which is an id of the parent node. If parent is specified then it will limit the search scope to that parent and its subnodes.
The third optional argument returnIndex indicates if you want the sidebar node or its index in the .nodes array.
You can call this method without any arguments and it will return to you ids of all nodes in the entire sidebar.
If you defined the object in the following way: To get ids of all nodes: To get a specific node:

User Comments

comments powered by Disqus