【问题标题】:Fancy tree disable checkbox selection for nodes花式树禁用节点的复选框选择
【发布时间】:2015-08-07 03:31:19
【问题描述】:

花式树

我们想要的是禁用基于我们添加的自定义类的复选框。

例如:

renderNode: function(event, data) {

    if(!data.node.folder) {
        $(data.node.span).addClass("custom-class");
    }

    $(".custom-class").css({ // css to disable checkbox});

}

【问题讨论】:

    标签: jquery fancytree


    【解决方案1】:

    您不能仅使用 css 禁用复选框(只需切换或调暗图像)。 而是使用api:

    node.unselectable = true;
    node.render();
    

    【讨论】:

    • 哦,好的,我们拥有的树很大,所以我们希望采用 css 方式而不是这种方式,因为我们需要解析树中的所有节点。谢谢你的回复,非常感谢。尊重你创造了这么棒的插件!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多