简体   繁体   English

获取dynatree中所有未选择的节点

[英]Get all unselected nodes in dynatree

I have implemented dynatree. 我已经实现了dynatree。 I can get all selected nodes simply by: 我可以通过以下方式简单地获取所有选定的节点:

$("#tree").dynatree("getSelectedNodes");

How can I similarly get all unselected nodes? 我如何才能类似地获取所有未选择的节点?

$('#tree') will give you an array of all the nodes. $('#tree')将为您提供所有节点的数组。 And your code here will give you an array of selected nodes. 您的代码将为您提供一系列选定的节点。 You can loop through the main tree nodes array and generate a new array by checking if the node in a particular iteration does not match with selected nodes array. 您可以遍历主树节点数组,并通过检查特定迭代中的节点是否与所选节点数组不匹配来生成新数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM