Page 1 of 1

Expand script

Posted: Fri Mar 11, 2005 1:15 pm
by Lisk
<script language='JavaScript'>
function expand_content(span)
{
displayType=(****.getElementById(span).style.display=='none') ? 'block':'none';
****.getElementById(span).style.display=displayType;

}

</script>

0001 -expand-
<span id="0001" style="display: none">expanded, wow!
</span>

This is what I use, but is there anything... smaller/faster w/e?

Posted: Sat Mar 12, 2005 7:20 am
by ELRocco
thats a cool script it will work in all browsers and is very simle you do it youtrself?

Posted: Sat Mar 12, 2005 3:07 pm
by Lisk
Never tried. Never got "it doesnt work" comments", so it should.

Don't remember, probably got it off somewhere.

Posted: Sat Mar 12, 2005 11:55 pm
by ELRocco
ya it works, if you ever want to test a script just use photobuckets html test
http://photobucket.com/practice.php

Re: Expand script

Posted: Fri Feb 24, 2006 11:33 am
by kaos_frack
Lisk wrote:<script language='JavaScript'>
function expand_content(span)
{
displayType=(****.getElementById(span).style.display=='none') ? 'block':'none']0001 -expand- [/url]
<span id="0001" style="display: none">expanded, wow!
</span>

This is what I use, but is there anything... smaller/faster w/e?
well i don't know any other way that is faster
but probably you can shorten your script