Board Logo

stay open 1 menu at a time
designbai - 1/20/2004 at 11:55 AM

Is there a way to keep only one item opened other than rooooot? If yes please let me know where do i need to change in the code?

rock - 1/21/2004 at 11:22 AM

You should set
this.b_opened = true;
instead of
this.b_opened = !this.n_depth;
when desired item is created.

designbai - 2/3/2004 at 01:01 PM

Thanks for your reply.
My question is :
If one item is expanded all other item should collapse.

for ex.

subitem 2

In the above case when i press aa, all subitem of aa should expand and all other menu items shuold collapse (like dd should collapse) vice versa when i press dd, dd should expand and aa should collapse.

I think this is little bit clear.

thanks for your reply

rock - 2/4/2004 at 07:53 AM

Tigra Tree Menu PRO has open API and you could easily set up the behavior desired.

designbai - 2/4/2004 at 10:03 AM

U mean it is not possible with this version?

rock - 2/5/2004 at 08:48 AM

It is possible. You should operate with o_parent.a_children array to browse all items at the same level and toggle method to open/close nodes.
In your case if you open node 'aa' you should cycle through members of its o_parent.a_children array and call toggle(true) method for them (except 'aa' for it also is a member of the array).

designbai - 2/7/2004 at 06:59 AM

Could you please tell me where exactly i should do the modification, so that it will ease my work. It will be grateful to you.

thanks hope you will help me in this.

Back to forum: