Hiding text, then on click revealing it

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Mythic Fr0st
Forum Contributor
Posts: 137
Joined: Sat Dec 02, 2006 3:23 am
Contact:

Hiding text, then on click revealing it

Post by Mythic Fr0st »

I need to have like a link

it'll be like

Stats and when you click it, it lists a whole bunch of text above it
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

First i must say....
Before You Ask

Before asking a technical question by e-mail, or in a newsgroup, or on a website chat board, do the following:

1. Try to find an answer by searching the archives of the forum you plan to post to.
2. Try to find an answer by searching the Web.
3. Try to find an answer by reading the manual.
4. Try to find an answer by reading a FAQ.
5. Try to find an answer by inspection or experimentation.
6. Try to find an answer by asking a skilled friend.
7. If you're a programmer, try to find an answer by reading the source code.
Because you and others have been posting a lot of Easily Google-able, and info that can be found at http://www.php.net.

And i don't know if English is your native language, but you need to try spell check, and re-read your posts, and fill them out with as much information as possible to help us, help you.

Code: Select all

#hidden{
visibility:hidden;
}

Code: Select all

function show(that){
	if(document.getElementById(that).style.visibility == 'visible'){
		document.getElementById(that).style.visibility = 'hidden';
	}else{
		document.getElementById(that).style.visibility = 'visible';
	}
}

Code: Select all

<a href="javascript:show('hidden');">Show</a>
<div id="hidden">
Hidden Text!
</div>
// Note to Mods: Styling the Above in HTML breaks : into

Code: Select all

:
Post Reply