jstree 刷新数据

$().ready(function() {
 
var tree = $('#tree');
tree.jstree({ 'core': { data: null } });
 
$("#xreload").on("click", null, function(e) {
//e.preventDefault();
var url = $(this).attr("data-url"); //+ "?" + Math.random();
ajax.get(url, null, "json", function(json) {
tree.jstree(true).settings.core.data = json;
tree.jstree(true).refresh();
//console.debug("reloaded.");
});
}); 
});

你可能感兴趣的:(jstree 刷新数据)