[Javascript] Javascript Tree menu

Brian Jones bdotjones at gmail.com
Fri Oct 20 13:00:51 CDT 2006


> My approach to this problem would be different -- instead of messing
> with style and innerHTML attributes, I'd toggle the sub-menus by
> toggling the classNames of the clicked LIs between 'expanded' and
> 'collapsed' or whatever.  Then you can define those classes in your
> stylesheet to include image name (a background image on the LI
> element) and the display property of the child ULs.


Hi Paul,

I changed it to getElementsByTagName("UL") but know when i click
collapse all it hides the whole menu and the expand all still does not
work...How would i changed the javascript to go about doing it the way
that you suggested



More information about the Javascript mailing list