Board Logo

Initialize Root tree with close state
tnn - 5/1/2008 at 05:56 AM

Hello,

as normally, I create a tree like this:

new tree (TREE_ITEMS, TREE_TPL);


is there a parameter for having the tree close instead of showing the tree items by default?

please help.

thx


tigra - 5/1/2008 at 01:37 PM

you can use 'st' key:

['home','index.html',{'st':0}]

or collapse the item after the tree initialization

var myTree = new tree (TREE_ITEMS, TREE_TPL);
myTree.a_index[0].open(1);


tnn - 5/1/2008 at 04:30 PM

thank you.

second choice works great.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/