zTree第一章,纯静态
zTree v3.5 Demo 演示
http://www.treejs.cn/v3/demo.php#_101
----------------------------------------------------------------------------------
纯静态zTree
----------------------------------------------------------------------------------
<ul id="treeAdmin" class="ztree"></ul>
或者<div id="treeAdmin" class="ztree"></div>
----------------------------------------------------------------------------------
var setting = {
view: {
addDiyDom: addDiyDom
}
};
----------------------------------------------------------------------------------
var treeObj = $.fn.zTree.init($("#treeAdmin"), setting,nodes);
----------------------------------------------------------------------------------
var nodes2 = [ {
name : "小学",
iconOpen : folderOpen,
iconClose : folder,
isParent :true,
/*open :true,*/
}, {
name : "初中",
iconOpen : folderOpen,
iconClose : folder,
}, {
name : "高中",
iconOpen : folderOpen,
iconClose : folder,
}, ];
----------------------------------------------------------------------------------
end