Hello,
I'm trying to create a tree by generating UL and LI elements, it works great.
However, all nodes are expanded, I would like to add entire branches collapsed by default, how can I do this?
I do not want to use JQuery as much as possible, I create items as HTML or JavaScript elements.
I tried to set the class to empty and hide the subtree by default but it does not work well.
I know that there is an 'expanded' class, but I have not seen a similar 'collapsed' class that would solve the problem.
Best regards
TreeView - collapsed nodes by default
it works great, thanks
best regards
best regards