Hi, I want to make a tree menu that is only need to be viewed (no drag/ drop, editing ).
searched the groups and i found this post. http://xrl.us/wsgg quote the 6th post from David Dashifen Kees ==== I'd suggest using a structure rather than hierarchical divs; I've made tree menus mostly out of unordered lists. The children of any node in a list are then contained within an internal <ul> within the <li> of the node. Then, when a list item is clicked, you can open or close it's internal <ul> with toggling or, as I usually do it, changing the class name of the list item that you click. That way the class name can not only control the display of any internal <ul> but it can also alter the image that appears to the left of the <li> which indicates whether the list is expanded or collapsed. ==== that seems to be a simple solution but i don't understand the "changing the class name of the list item that you click".. I thought i would give a unique classname for each <ul> when i generate the whole tree. then i can expand this <ul> when user click on it. why changing the classname ? I reread his explanation few time but still can't figure out the reason.. thanks, James. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
