我正在使用 JsTree。目前,仅在单击父节点旁边的图标时才展开树的元素。我该如何使树在单击父节点时也能展开?
完整的命令列表可以在此处找到:http://www.jstree.com/documentation/core 以下是监听点击事件的close_node和open_node的简单实现。
.jstree({...}).delegate(".jstree-open>a", "click.jstree", function(event){
$.jstree._reference(this).close_node(this,false,false);
}).delegate(".jstree-closed>a", "click.jstree", function(event){
$.jstree._reference(this).open_node(this,false,false);
});