Finally, I found a solution, although it does not look very nice, but it works. Just pass the found elements to the enableSubtree () function, and it will show the nodes and take care of the correct appearance (that is, the dashed lines will be shown and hidden correctly).
enableSubtree = function(elem) {
elem.siblings("ul:first").find("li").show();
return correctNode(elem.siblings("ul:first"));
};
correctNode = function(elem) {
var child, children, last, _j, _len1, _results;
last = elem.children("li").eq(-1);
last.addClass("jstree-last");
children = elem.children("li");
console.log(children);
_results = [];
for (_j = 0, _len1 = children.length; _j < _len1; _j++) {
child = children[_j];
_results.push(correctNode($(child).children("ul:first")));
}
return _results;
};
A call to this function might look like this:
enableSubtree($(".jstree-search"))
CSS.jstree-search.