jsTree provides an open_node () function to arbitrarily run any node to open. Just scan the tree for non-open parents and open them.
:
http://jsfiddle.net/mmeah/yyy8W/
$("#findChild").click(function(){
$.jstree._reference(myTree).open_node("#Node_001",function(){;},false);
});
$("#findGrandChild").click(function(){
var closedParents = $("#Node_003").parents("li.jstree-closed");
for(var i=closedParents.length-1;i>=0;i--){
pleaseOpen($(closedParents[i]));
}
});
function pleaseOpen(thisNode){
if(typeof thisNode=="undefined") return;
if(thisNode.hasClass("jstree-leaf") || thisNode.hasClass("jstree-open") ) return;
$.jstree._reference(myTree).open_node(thisNode,function(){;},true);
}