Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Location
    NYC
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using text links to make additional text appear

    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.

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    375
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That is extremely close to Dynamic Drive's Switch Content Script. It could easily be adapted to be exactly like you say.

  • #3
    New to the CF scene
    Join Date
    Aug 2005
    Location
    NYC
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excellent!

    Thanks so much. This is perfect.

  • #4
    New to the CF scene
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is there a way to do this without Java and just use HTML completely?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •