rahim asgari
rahim asgari

Reputation: 12437

How to use jquery dynatree plugin as accordion menu?

I am using dynatree as a tree menu in my project. When the user expand a node i want the previous expanded node to collapse (like an accordion menu).

I think that i have to collapse it in the onExpand event of dynatree. But i dont know how.

Thx in advance.

Upvotes: 0

Views: 156

Answers (1)

markpsmith
markpsmith

Reputation: 4918

Add this to your tree definition:

autoCollapse: true,

From the documentation: Automatically collapse all siblings, when a node is expanded.

Upvotes: 1

Related Questions