I’m using JStree plugin to create a tree, my question is if there is any option or way to show the first child of a list.
For instance, i got a list with 5 children and some children has other childrens, in my case i just want to show the first children of each
There is my code
html list
<ul id="tree">
- Sub Item 1.1
- Sub Item 1.2
- Sub Folder
- test
- SubFolder
- Third Child
- Third Child
- Third Child
- Sub Item 2.1
- Folder 2.1
- Sub Item 2.1.1
- Sub Item 2.1.2
an here my js
$(function() {
$("#tree").treeview({
collapsed: true,
animated: "medium",
control:"#sidetreecontrol",
persist: "location"
});
})
Actually in this plugin you cant do that, i fixed it using css: