hummingbird-treeview
hummingbird-treeview copied to clipboard
initialize expand tree
First thanks for your great script :-) But if I want to initialize a pseudo HTML with "expandAll", it dosen't work in the right way. I'll get a tree but it is not possible to collapse or expand it via mouse click. Also the checkboxes doesn't work in this case for sub checknoxes, independently which browser I use.
The only workaround I found was, first to initialize the tree without any parameter and after that to use "expandAll", but I think that's not the best way ;-)
$("#treeview").hummingbird(); $("#treeview").hummingbird("expandAll");
Hi, Thanks for using the hummingbird-treeview. You are absolutely right, initialization with "expandAll" is not possible and your workaround is a solution. However, there is a better way to do it via an option.
Before initialization ($("#treeview").hummingbird();) use this:
$.fn.hummingbird.defaults.collapseAll= false;
Check the README for more options: https://github.com/hummingbird-dev/hummingbird-treeview#options