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

posted @ 2018-08-03 11:14  WhoKnows1  阅读(116)  评论(0编辑  收藏  举报