I am using jstree in my project. when my page gets loaded, the entire tree expands for very short time and then collapses back to its original position. can someone please tell me how can i stop the tree from expanding on page load?
Asked
Active
Viewed 64 times
1 Answers
0
This can be solved by hiding the tree initially:
<div id="myTreeDiv" style="display:none">
<ul>
...
</ul>
</div>
Then initialize & show it in one go with code similar to this:
$("#myTreeDiv")
.jstree({
// set tree parameters here ...
})
.show();

Peter B
- 22,460
- 5
- 32
- 69