var treeJSON = '';
function getTreeJSON() {
$.ajax({
type: 'POST',
url: 'controller.php',
async: false,
data: {
param: "FunctionCore->FunctionCoreImpl->getTreeJSON()"
},
dataType: 'json',
success: function (JSON) {
treeJSON = JSON;
}
});
}
tree.treeview({
levels: 1,
color: "#428bca",
data: treeJSON});
I can get json from the page, but bootstrap-treeview does not work First,i want to use dynamic json in bootstrap-treeview. Second, i don't want to refresh the page. What can i do?
I got answer from here . I find that i don't need to get dynamic json, i just need to reload bootstrap-treeview.