Has someone any idea if it's possible and how to search for all occurences of a keyword in the tree, expand and highlight all the results and their path to the root element.
I've found already an example for a single search here: https://github.com/mbraak/jqTree/issues/211
$('#search').click(
function() {
var $tree = $('#tree1');
var search_term = 'xyz';
var tree = $tree.tree('getTree');
tree.iterate(
function(node) {
if (node.name.indexOf(search_term) == -1) {
// Not found, continue searching
return true;
}
else {
// Found. Select node. Stop searching.
$tree.tree('selectNode', node, true);
return false
}
}
);
}
);
Thank you in advance!
SOLVED!