SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: FAQ troubles

  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FAQ troubles

    Hey I am trying to make a FAQ page for a cleint and they asked if I could make there FAQ a little less intiminating. so he wants me to make it into a page of questions with a hyper link or button that will display the answer right under the question when it is clicked, any idea on how to do that let me know please!

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,836
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Sure, you could put the answer in a div under the question with display:none on the div's style in the CSS (or visibility:hidden will work if you want to preserve the space the answer occupies.). Then when the link or button is clicked to display the answer, a simple Javascript onclick event fires to change the div's display to block or visibility to visible which will then show the answer right under the question.

    It's pretty simple.


Tags for this Thread

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
  •