0

使用以下代码,jstree 在加载时卡住了。

    <meta charset="UTF-8">
    <title>No title</title>
<link rel="stylesheet" type="text/css" href="theme2/jquery-ui-1.8.17.custom/css/ui-lightness/jquery-ui-1.8.17.custom.css" media="screen" />
<link rel="stylesheet" type="text/css" href="layout-default-latest.css" />
    <script type="text/javascript" src="jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="jquery.jstree.js"></script>
    <script type="text/javascript" src="jquery-ui-1.8.17.custom/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="jquery.layout-latest.js"></script>  



$("#treeFile").jstree({ "themes" :  { 
                        "theme" : "default", 
                        "dots" : false, 
                        "icons" : false 
                    },
            "plugins" : ["themes", "treeFile"]
});

有趣的是,如果将 false 的值更改为 fales,它可以工作,但无法为点和图标名称提供真正的 false 值。

4

2 回答 2

0

我认为您缺少数据源。

    "json_data" : {
             {
                 "data" : "Node 1",
                 "children" :[],
                 "state" : "open"
             },
             {
                 "data" : "Node 2",
                 "children" :[],
                 "state" : "open"
             },
             {
                 "data" : "Node 3",
                 "children" :[],
                 "state" : "open"
             }
        },
        "themes" : {"theme" : "classic"},
        "plugins" : ["themes", "json_data"]
}
于 2013-10-23T16:30:35.110 回答
0

尝试这个:

$("#treeFile").jstree({ "themes" :  { 
                    "theme" : "default", 
                    "dots" : "false", 
                    "icons" : "false" 
                },
        "plugins" : ["themes", "treeFile"]
});
于 2012-10-16T17:48:03.667 回答