jsp或html代码中
<ul id="tree" style="margin-top: 5px;"></ul>
javascript中
tree = $('#tree').tree({
url : '',
animate : false,
onClick : function(node) {
},
onLoadSuccess : function(node, data) {
var t = $(this);
if (data) {
$(data).each(function(index, d) {
if (this.state == 'closed') {
t.tree('expandAll');
}
});
}
}
});
});
<ul id="tree" style="margin-top: 5px;"></ul>
javascript中
tree = $('#tree').tree({
url : '',
animate : false,
onClick : function(node) {
},
onLoadSuccess : function(node, data) {
var t = $(this);
if (data) {
$(data).each(function(index, d) {
if (this.state == 'closed') {
t.tree('expandAll');
}
});
}
}
});
});