I am using jstree and several nodes in my tree have the same name. If i am selecting a node with name ‘aaa’, i want all nodes with name ‘aaa’ to be selected.
$j(“#actionButtonTest”).click(function() {
$j("#demo2")
.bind("select_node.jstree", function (e, data) {
alert(data.rslt.obj.attr("name")); //alerts node name
data.inst.select_node($j('li[name="situ"]')); //selects node with name 'situ' -- not working though
$j.jstree.select_node($j('li[name="situ"]')); ////selects node with name 'situ' -- not working though
});
});
I would be grateful if somebody could show me the right way of selecting all nodes with a particular selected name.
Cheers
I think jstree is written to select 1 node at a time by code. Try this: