Reputation: 12437
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
Reputation: 4918
Add this to your tree definition:
autoCollapse: true,
From the documentation: Automatically collapse all siblings, when a node is expanded.
Upvotes: 1