Web Hosting Forums

Results 1 to 4 of 4

This is a discussion on "Text Collapsing" in the Hosting Talk & Chit-chat forum
Hello, I'd like to do something in my site's FAQ section. I'd like people to see the questions, and when clicking them, the answers will ...

  1. #1
    Loyal Client
    Join Date
    Oct 2006
    Posts
    2

    "Text Collapsing"

    Hello,

    I'd like to do something in my site's FAQ section. I'd like people to see the questions, and when clicking them, the answers will appear beneath them. This is done on many sites (I don't have a specific example), but I don't know where to look for such a thing (CSS, JavaScript? etc.) and how to do it.

    Any help would be great,

    Jonathan

  2. #2
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    I incorporate a LOT of code from Dynamic Drive on my web sites, with suitable credits (check my source code)! These guys maintain the best collection of (and most useful) scripts on the web -- been that way for years!!!

    http://www.dynamicdrive.com/

    Look around their site and I'm sure you'll find what you need!
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  3. #3
    Loyal Client
    Join Date
    Oct 2006
    Posts
    2

    Thanks

    Found there a few very helpful items. Thanks a lot. Great site.

  4. #4
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,570
    The best way to do it is to use some tiny bits of JavaScript to switch blocks of text between visible and invisible. Usually you use a specific CSS class that's defined as not displaying and you put the invisible stuff in there.

    The cool thing about this approach is that it's not only simple, but also completely transparent for text browsers and such and (if you do it well) also for folk that disable JavaScript. (All those groups can access the content just fine, they simply see all Q&A's always open.)
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

Bookmarks

Posting Permissions

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