Expand all with specific node in 0.9.8

162 views
Skip to first unread message

Dan Cooper

unread,
Jan 13, 2010, 4:27:19 AM1/13/10
to jst...@googlegroups.com
Hi,

I'm using jsTree 0.9.8 at the moment on my site and I see in the documentation that I should be able to specify a node to expand all on using the open_all(<NODE>) call but no matter what I specify (jQuery selector or node) I always get all nodes expanding, not just the ones below the specified node. Is this broken in 0.9.8 or is there a way to make it work?

Thanks for the great component BTW!

Dan

Tsukasa1989

unread,
Jan 13, 2010, 4:42:05 AM1/13/10
to jsTree
Hello,

It is working on the demo page with the following code:
$.tree.focused().open_all("#phtml_1");

URL:
http://www.jstree.com/demo/open_close

The following code should work fine:
$.tree.focused().open_all(NODE);

But in the current function you using? If it is a JSTREE function you
will also have a TREE_OBJ parameter and you can use TREE_OBJ.open_all
(NODE); Where the NODE is also given as parameter. If you don't have
this NODE object you have to give the node id to the function.

Greetings,

Niels

Dan Cooper

unread,
Jan 13, 2010, 4:47:26 AM1/13/10
to jst...@googlegroups.com
Hi,

Thanks for pointing out the demo, I didn't see that although it is using 0.9.9a and I'm using 0.9.8.

My code looks like this:

$.tree_reference(treeref).open_all($.tree_reference(treeref).selected);

Which I believe should expand all nodes below the currently selected node but it always expands the entire tree.

Thanks,
Dan

> --
> You received this message because you are subscribed to the Google Groups "jsTree" group.
> To post to this group, send email to jst...@googlegroups.com.
> To unsubscribe from this group, send email to jstree+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jstree?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages