I'm using the jsTree plugin, trying to get it to fetch the information by AJAX .
On server side I have four tables in the database, each one a level of the tree.
Tabela1
-Tabela2
--Tabela3
---Tabela4
Making the plugin search the first level was easy:
$("#tree").jstree({
core: {
data: {
url: "/tabela1.json"
}
}
});
But I'm not able to hit the syntax to make it fetch the other level, at the click of the user.
The two attempts below did not work:
$("#tree").jstree({
core: {
data: {
url: "/tabela1.json",
data: "/tabela2.json"
}
}
});
$("#tree").jstree({
core: {
data: {
url: "/tabela1",
data: {
url: "/tabela2.json"
}
}
}
});