How to get the currently oriented node in a yui TreeView
1 answer
The next (2.7) version of TreeView will have a TreeView.currentFocus property that will point to the Node with focus.
In 2.6 one option is to use Dom's getElementsByClassName and HTML search the tree for any element with class name "ygtvfocus" and then use the TreeView getNodeByElement method, which should tell you which Node was.
At least two elements will be returned with class focusName, one being the toggle icon and the other being the label. Any of them will do this, just remember that this is the array you have.
+4
Satyam
source
to share