I'm using JsTree. Right now, the elements of the tree only expand when the icon NEXT to the parent node is clicked. How can I make it so the tree expands also when the parent node is clicked?
The full list of commands can be found here:http://www.jstree.com/documentation/core Below is a rough implementation of the close_node and open_node listening to the click event.
.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);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With