[thelist] dom tree help

Tom Dell'Aringa pixelmech at yahoo.com
Mon Aug 25 18:32:12 CDT 2003


Hello,

I have a little tree script:

http://www.pixelmech.com/test/dom_tree.html

This only has to work in IE6 exclusively. It works right now. The
problem I have is that the 2nd level tree items (the section 1.1, 2.1
etc) appear OPEN when the grade is toggled.

I need them to start as closed. All I am doing is seeing if the root
node has children, then showing/hiding all the divs. Can anyone
suggest a good way to only open the next level, not all the levels?

I tried using firstChild() - but that turns out to be the anchor I
believe. How can I only show/hide the FIRST div? It's fine if this
has to be a separate function for the grade toggle and a separate
function for the section toggle.

TIA

Tom

=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: Premium Content Author / JavaScript / Every Friday!
http://www.maccaws.com/ :: Group Leader
[Making A Commercial Case for Adopting Web Standards]

"That's not art, that's just annoying." -- Squidward


More information about the thelist mailing list