I have been utilizing the jstree javascript plugin for loading data asynchronously. An essential feature I am working on is implementing search functionality for the tree's data. The process involves a web service that provides an array of ids following a search query. Notably, the tree is not loaded prior to performing a search. Upon user inputting a search query and triggering the function, I aim to gradually open nodes in the tree based on the respective ids obtained.
for(var i = 0; i < ids.length; i++){
$("#tree").jstree("open_node", document.getElementById(ids[i]));
}
Despite my efforts, only the root node appears to load successfully. Could someone propose a straightforward solution for sequentially loading nodes using an array of ids?
I appreciate any assistance you can provide. Thank you.