...

View Full Version : Using text links to make additional text appear



Sign of Eth
08-21-2005, 02:19 PM
As a JS neophyte I'm having a problem creating for myself a script that does something I've seen on countless sites. And since my knowledge of JS syntax is poor, all my combinations of keywords in Google searches have proven fruitless.

This is what I have:

Text Link 1
Text Link 2
Text Link 3

The functionality I seek is this: When someone clicks on one of the links, say #1, the appearance becomes:

Text Link 1
Here is where some text has magically appeared!
Isn't it nice? Click to make disappear.
Text Link 2
Text Link 3

And, naturally, when the "Click to make disappear" text is clicked the appearance returns to its default state.

Can anyone help me work something out?

Thanks. :)

jscheuer1
08-21-2005, 03:05 PM
That is extremely close to Dynamic Drive's Switch Content Script (http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm). It could easily be adapted to be exactly like you say.

Sign of Eth
08-21-2005, 04:28 PM
Thanks so much. This is perfect. :D

gino_j
05-14-2009, 05:42 PM
is there a way to do this without Java and just use HTML completely?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum