[thelist] Q on dHTML sibling/child
jsWalter
jsWalter at torres.ws
Sat Mar 13 14:16:31 CST 2004
> -----Original Message-----
> From: Jeff Howden [mailto:jeff at jeffhowden.com]
> Sent: Saturday, March 13, 2004 1:48 AM
> To: jsWalter at torres.ws; thelist at lists.evolt.org
> Subject: RE: [thelist] Q on dHTML sibling/child
>
>
> walter,
>
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > From: jsWalter
> >
> > I have this block...
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> first off, drop the dots in the html samples. how annoying to
> have to strip those to test the code.
Yes they are, but many lists I'm on like it so mail readers do not try to
"render" them.
Sorry.
>
> the <span> tags are superfluous. you could just as easily put the id
> attribute and onclick event handler on the <a> tag. for that
> matter, since
> the <a> tag doesn't actually *do* anything, you could put all that info on
> the containing <li> tag. then, it's a simple matter of toggling
> the display of the first childNode/childElement.
>
> fwiw, i usually avoid dom-walking if at all possible. for similar
> functionality, but executed in a different manner, check this out:
>
> http://evolt.jeffhowden.com/jeff/code/toggle_display.cfm
Thanks, I'll check it out.
Walter
More information about the thelist
mailing list