Page 1 of 1

How to create a tree structure

Posted: Tue Feb 20, 2007 11:36 pm
by chitrapu
i need to create a tree structure that has to expand and collapse when the button is clicked. How do i do this

Posted: Tue Feb 20, 2007 11:45 pm
by Kieran Huggins
nested list tree? http://be.twixt.us/jquery/treeView.php

drag'n'drop-able tree? http://interface.eyecon.ro/demos/drag_drop_tree.html

:google:

"There are more javascript trees on the internet than are dream'd of in your philosophies"

thanks a lot

Posted: Tue Feb 20, 2007 11:52 pm
by chitrapu
thanks a lot but i need some code to do that. The links show only the tree structures. :twisted: :P :?

Posted: Wed Feb 21, 2007 12:19 am
by Kieran Huggins
:banghead:

:google:

Posted: Wed Feb 21, 2007 3:25 am
by CoderGoblin
If you look at the code from the links provided you should get an answer to your question. Another possible resource is Nested Tree Display : Comments appreciated. I would like to point out that I built the original code for an application where several tree solutions using javascript (found using google) failed on large trees, or didn't allow me to add/remove tree nodes dynamically. I intend to look at the jquery solution and test what it's limits are but I have been meaning to do that for a couple of months. :wink: