Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a Expand/Collapse FAQ Accordion, Collapse other on Click 1

Status
Not open for further replies.

lmcate

MIS
Jan 17, 2012
36
0
0
US
Hi There:

I have an Html FAQ Page with Questions and Answers like this I would like to to a collapse and I don't have the css/java code to do it.

☻ What are the fees for parking?
♦ The fees are $20 a day

☻ What are the store hours?
♦ The Store Hours are M-F 10-6 Sat 10-5 Sun 11-2

etc........

Thanks,

Sam

 
Hi

First question would be whether you already use any JavaScript framework. If yes, then see whether it has an accordion widget. For example if you use jQuery, then the jQuery UI' accordion widget would be a handy choice.


Feherke.
feherke.github.io
 
Sam,

I'm not really qualified to give you any advice about this on a technical level. There are other people in this forum who can do that better than me. But there is also a usability issue here.

In general, when the FAQ has a large number of questions and/or long and non-trivial answers, an accordion is a good choice from the user's point of view. It gives them a quick overview of the questions, and it hides the information that they are not interested in.

But if the FAQ has fewer than half a dozen or so questions, and if the answers are mostly just one or two sentences, then I would argue for doing away with the accordion and just presenting the FAQ as a simple static page of text. That would give the user a quicker and simpler way of seeing the required information at a glance, with the minimum of clicking and scrolling.

Of course, I don't know anything about the information you will be presenting in this case. The stuff about parking fees and store hours might be just examples to give us the general idea. But if that is typical of the actual information you will be showing, I would go further and suggest doing away with a FAQ completely, and give a simple set of bullet points instead. Something like this:

Practical information
[li]Parking fees: $20 per day.[/li]
[li]Store hours: M-F 10-6, Sat 10-5 Sun 11-2 [/li]
etc.

Anyhow, that's my opinion, for what it's worth. Others will disagree.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top