mbraak / jqTree

Tree widget for jQuery
https://mbraak.github.io/jqTree/
Apache License 2.0
1.02k stars 177 forks source link

Expand clickable area for node open to include label? #284

Closed tammer closed 10 years ago

tammer commented 10 years ago

Currently you have to click on the tiny little arrow on the left to open a node. is there a way to so that you can click on the label to achieve the same thing? jqtree

(great library btw. thanks!)

ankushg commented 10 years ago

Wondering the same thing!

mbraak commented 10 years ago

You can do this with the following code:

var $t = $('#tree1');
$t.tree();

$t.bind('tree.click', function(e) {
    $t.tree('toggle', e.node);
});
tammer commented 10 years ago

Thanks!