zTree

Results 54 comments of zTree
trafficstars

可以利用 level 的class 给 li 添加 css ,可以利用 float 让其横向排列。 但按照你的说法 如果第二级 叶子节点和 父节点 混在一起时可就没办法啦。

目前 就自己触发一下吧。。。

真抱歉,最近忙项目,没有来看。。。不知道你的问题是否已经解决? transformToArray 方法不会删除 node 的属性。。。只是把节点的子节点用递归方式全部转成 数组,便于有些用户处理数据, 但每个node 对象的 children 属性还是存在的,所以如果把 transformToArray 的结果直接扔给 zTree,你会发现有很多重复节点的。

今早抽空实验了一下,就用 Demo 中的 multiTree.html 测试, 修改了 dom ready 的方法: ``` var z1, z2; $(document).ready(function(){ z1 = $.fn.zTree.init($("#treeDemo"), setting, zNodes); z2 = $.fn.zTree.init($("#treeDemo2"), setting, zNodes); var n = z2.getNodeByParam('id', 2); z2.removeNode(n);...

请你能否提供一个简单的 demo 代码来重现这个问题么? 我实验了一下,不管是初始化这两个节点,还是用 addNodes去添加; 不管是使用用鼠标操作,还使用 selectNode 方法选中。。。都没有重现你说的情况呀。 谢谢

非常感谢, 不过目前请你先直接修改 css ,让 移动中的 节点也能支持 文件夹的图标就可以了

oh, It's so easy. Please use the callback.onClick. when user click the node's name, zTree will trigger this function. In this function, you can check the node with 'checkNode()' function.

yes, in myFunction, you can get the ‘treeId’ & ‘treeNode' parameters ....so you can use ``` treeObj.checkNode(treeNode, !treeNode.checked); ``` please check the API & Demo

You can search node and create the nodes of the result , and use the init() method. The other way, you search node and set the other nodes to hide....

1. expandNode method will auto expand the node's parent node. 2. the root node has not parent node. if you still aren't resolve the problem, please tell me. Or share...