Populate treeview

Populate treeview

Hi,

I need to develop a webpage that loads a structure of products. I managed to do this using PHP and JS, but many details are still lacking.

I found some topics about jQuery and treeview, but I still did not find a code what if it adapts my necessities.

I am going to explain better: 

1. each product can be a son of more than a product;

2. over there to show the structures, in the same page there is a box of text for search. While finding the text and he will be in the precise structure to detach the briefcases that should contain this text;

3. since it is delayed to load the whole structure I want that the structure is loaded only when I click on thef the "parent" node.

4. if I click on a "node" that was already loaded once then I do not need to load it again, just expander it.

Is there a jQquery code that do this for me ?

Thank you very much,

Marcos