As you can see there are some obvious issues with this piece of code:
I need a setTimeout to wait for the tree to be loaded, which is not the way to go
The path is hard-coded
The tree does open the first root node (1062), but selects the node underneath it (1132), which is obvious, but not how I want it. If I leave 1132 out of the path, the root node is selected but not expanded
Expanding the tree after a refresh takes some time, it looks like the UI is locked for some time
There's no detection to check if the page is loaded after logging in, so without a node already selected via the URL
First things first; is it possible to expand the root node without selecting the first child node?
And is there an event for the tree which notifies when it's loaded?
Okay, so please bear with me, this is really ugly, but does what I want:
$("ins:eq(0)").click();
This does in fact do exactly what I'd like. So if there isn't a better way, this is fine with me.
Now I just need to know how the other issues can be handled.
Expand first node in content tree
Hi!
I'm trying to automatically expand the first node underneath 'Content' in the tree. This is what I've got so far:
As you can see there are some obvious issues with this piece of code:
First things first; is it possible to expand the root node without selecting the first child node?
And is there an event for the tree which notifies when it's loaded?
Appreciate any suggestions, thanks!
Okay, so please bear with me, this is really ugly, but does what I want:
This does in fact do exactly what I'd like. So if there isn't a better way, this is fine with me.
Now I just need to know how the other issues can be handled.
is working on a reply...