【问题标题】:How to loop over all the nodes of a jstree如何遍历jstree的所有节点
【发布时间】:2015-11-11 11:36:50
【问题描述】:

我无法弄清楚如何循环遍历 jstree 的所有节点。

我正在寻找的是 jstree jstree1。我想遍历它的所有孩子和子孩子并打印/获取每片叶子的id

谢谢。

【问题讨论】:

标签: javascript jquery jstree jstree-search jstree-dnd


【解决方案1】:

这就是我解决问题的方法

$(function () {
    $.each($("#jstree1").jstree('full').find("li"), function (index, element) 
    {
        console.log($(element));
    });
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-19
    • 2012-05-05
    • 2016-04-16
    • 2015-08-28
    • 2012-05-04
    • 1970-01-01
    • 2013-09-13
    • 2020-09-01
    相关资源
    最近更新 更多