[thelist] javascript for expand/collapse list (aka tree view)

Sarah poohbear at designshift.com
Wed Sep 24 08:34:13 CDT 2003

>From: Tom Dell'Aringa
> > > http://www.pixelmech.com/review/dom_tree_new.html
> >
> > You're welcome! I'm glad it helped someone else too. Now if I could
> > only remember who helped *me* with that - because I did not write the
> > whole thing :) That's the beautiful thing about this list, eh?
>I tried many months ago to do the same (although my script was not as fine 
>as yours ;-)) -- and then my clients asked for a +/- so that the text you 
>use as an open/close control could feature a traditional link to 
>this-or-that page.
>So, for those who are looking for a variant, here's something that looks 
>It does quite the same as yours, while freeing the text from being a 
>control. The +/- controls are added through DOM insert methods, thus it's 
>quite configurable.
>I haven't used it in production environment but plan on doing so (soon, 


I'm not sure if you're still interested, or if this will meet your needs, 
but I just modified my script, which was modified from Tom's (which was 
modified from someone else's - isn't the web great?), so that it uses a +/- 
as the expand/collapse link. You can check it out here:


More information about the thelist mailing list