In this example, the data is loaded on demand from the server.
To use load on demand, you must do the following:
[
{
"label": "node1",
"children": [
{
"label": "child1"
},
{
"label": "child2"
}
]
},
{
"label": "node2",
"children": [
{
"label": "child3"
}
]
}
]
<div id="tree1" data-url="/nodes/"></div>
$('#tree1').tree({
dragAndDrop: true
});