treejs
                                
                                
                                
                                    treejs copied to clipboard
                            
                            
                            
                        expand the tree only one level
is there a possible way that i can expand just one level of the tree ? so my tree has like 5 levels and i only want to open one level at a time? is there a possible way to do so ?
my tree looks like this:
root sublevel1 sublevel2
if i click on the root node i just want sublevel 1 to appear, but everytime all nodes appear.
thanks! :)
After init of tree i added:
$('.treejs-switcher').each(function() { if (!$($(this)[0].parentNode).hasClass('treejs-node__close')) { $($(this)[0].parentNode).addClass('treejs-node__close') } });
Not very elegant but does the trick...
After init of tree i added:
$('.treejs-switcher').each(function() { if (!$($(this)[0].parentNode).hasClass('treejs-node__close')) { $($(this)[0].parentNode).addClass('treejs-node__close') } });Not very elegant but does the trick...
Thank you!