使用以下代码,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,它可以工作但无法给出点和图标名称一个真正的错误值。
答案 0 :(得分:0)
试试这个:
$("#treeFile").jstree({ "themes" : {
"theme" : "default",
"dots" : "false",
"icons" : "false"
},
"plugins" : ["themes", "treeFile"]
});
答案 1 :(得分: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"]
}