[thesite] comments on test.evolt.org

.jeff jeff at members.evolt.org
Fri Jun 29 13:57:59 CDT 2001


aardvark,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: aardvark
:
: very cool... it's hidden, i assume, and made
: visible by JS?  it would still appear for
: those poor NN3 users, though, if you eliminate
: server-side detection, correct?  or no?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nope, only available if you support the getElementById() method.  here's
what happens when the page first loads.  there's an empty <span> at the top
of the comments that is for the "expand/collapse all" link.  there's another
empty <span> next to each comment title for the "[ + ]/[ - ]" link.  as soon
as the page reaches the last of the comment section it encounters a function
which initializes these empty containers for those browsers that support the
getElementById() method.  it inserts the html for the "expand/collapse all"
link and the html for each "[ + ]/[ - ]" link.  then, if there are more
comments than the threshold we've defined it calls a function which toggles
all the comments to the collapsed state.

if you're browser doesn't have js enabled or it doesn't support the
getElementById() method it simply stays the way we're all used to seeing it.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: we claimed one template for all users, so why
: not stick to it?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

because it takes alittle more setup than an initial prototype warrants.
however, it *is* setup that way now for demonstration purposes.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: is it silly of me?  dunno...
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

i dunno either.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: are you gonna eat that?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

eat what?

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thesite mailing list