Closed nikhilbhatia22 closed 8 years ago
Thanks! I think you can call .bonsai('expandAll')
. There's also an addExpandAll
option. These should both be in the docs, feel like doing a PR?
Yes, I am using #expandAll & #collapseAll currently, Also, I checked addExpandAll option, but these all options creates two different separate links for expanding and collapsing... And as i said earlier, I want to toggle it with single hyperlink only... So, for that, I want to identify tree's current state i.e. if tree's current state is expanded then that single hyperlink onClick would change its state to collapsed and vice versa...
Ok, you can do that with a simple query: $('#tree').find('.expanded').length > 0
Thank you so much man.! Great project.!
You're welcome :)
Great Project!
I wanted to know, how can I identify state of whole tree... Basically, i am wishing to toggle expand/collapse state of whole tree with single hyperlink...