我是 jsTree 的新手,在一个非常简单的例子中遇到了问题。
我的html:
<ul id='categories'>
<li><a href"/Browse/1">Category 1</a>
<ul>
<li><a href="/Browse/3">Subcategory 1.1</a></li>
</ul>
</li>
<li><a href="/Browse/2">Category 2</a>
<ul>
<li><a href="/Browse/4">Subcategory 2.1</a></li>
</ul>
</li>
</ul>
代码:
<script type='text/javascript'>
$(document).ready(function() {
$('#categories').jstree({ 'plugins' : 'html_data' });
});
</script>
错误:
Line: 1694
Error: Exception thrown and not caught
似乎 jsTree 正在尝试调用我尚未安装的 cookie 插件。
就我而言,我不需要也不想要 cookie。
没有它们我如何运行 jsTree?
更新:
我试过这个加上各种插件组合:
<script type='text/javascript'>
$(document).ready(function() {
$.jstree.defaults.plugins = ['ui', 'crrm', 'themes', 'html_data'];
$('#categories').jstree();
});
</script>
现在的结果是一个空白页。错误已经消失了。
谢谢,
瑞克