javascript - 如何禁用 jstree 插件中的折叠

标签 javascript jquery jstree

基本上,我想做的是,我想将树结构中属于同一类别的内容显示为子父节点而不是文件夹结构。

最佳答案

https://github.com/vakata/jstree/issues/1101 上找到了解决方案

(function ($, undefined) {
    "use strict";
    $.jstree.plugins.noclose = function () {
        this.close_node = $.noop;
    };
})(jQuery);

$('#tree').jstree({
    plugins : ["noclose", ... ],
    ...
});

关于javascript - 如何禁用 jstree 插件中的折叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45789862/

相关文章:

javascript - 如何检查鼠标的Y坐标是否大于某个值

jquery - 将 Bloodhound 导入 Angular 2 CLI 项目

javascript - 窗口调整大小触发事件在 IE11 中不起作用

javascript - 如何访问 jstree 排序函数中的节点数据属性?

javascript - Angular/Chart.js 错误 : Failed to create chart: can't acquire context from the given item

javascript - 使用 .load() 时,我从外部页面获取所有 div,但我只想加载一个 div

javascript - 始终触发 jstree 事件

javascript - jstree select_limit 不工作。我想将选择限制设置为仅选择 3 个节点

javascript - 单击不同按钮时在模式中显示不同的表单

javascript - slider handle 超出水平 slider