get jstree parent nodes path

 

// catalogname = data1.rslt.obj.attr("title"); 
var ids = data.inst.get_path('#' + data.rslt.obj.attr('id'),true);
// Returns IDs from root to selected node
var names = data.inst.get_path('#' + data.rslt.obj.attr('id'),false); 
// Returns Name's from root to selected node 
alert("Path [ID or Name] from root node to selected node = ID's = "+ids+" :: Name's = " + names);

 

你可能感兴趣的:(jstree)