【问题标题】:disable expand/collapse in jstree在 jstree 中禁用展开/折叠
【发布时间】:2012-09-06 03:58:31
【问题描述】:

我需要显示一个 JSTree 但不展开和折叠。有什么方法可以实现吗?

在下面的链接中提到,在 jstree 中无法禁用展开和折叠,这似乎是一个错误。

https://groups.google.com/forum/?fromgroups#!topic/jstree/DFWEmFZ4OeI

但它是在 2009 年发布的。那么这个错误解决了吗?

【问题讨论】:

    标签: jstree


    【解决方案1】:

    只是不要给展开/折叠元素空间:

    <style>
         .jstree ins {width:0px}
    </style>
    

    【讨论】:

    • 感谢您的快速回复....你能告诉我在哪里设置宽度以防 jstree 以下? $(function () { $("#divCPTree").jstree({ "themes":{ "theme": "default", "icons": false }, json_data: { data: treeModel }, plugins: ["themes ", "json_data", "ui"] }) });如果您能提供一个示例 JSTree 就更好了 再次感谢
    • 只需将 CSS 样式包含在与树所在位置相同的 html 文件中即可。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-01
    • 2018-12-13
    • 1970-01-01
    相关资源
    最近更新 更多