We launched a new IT training category! Check out the 140+ courses now.

Start learning with our library of video tutorials taught by experts. Get started

Create an Expandable FAQ Listing with jQuery
Illustration by John Hersey

Create an Expandable FAQ Listing with jQuery

with Chris Converse

Video: Previewing the final project

Hi this is Chris Converse and this is a course on creating an Interactive FAQ for Your Web site. I want to start by showing a copy of the final project we'll be creating in this course. So what we're going to be doing is creating an FAQ that's going to have questions that you can roll your cursor over and get a little help icon. When I click on the actual question, it's going to open the answer, it's going to animate the Q and the A states over on the left-hand side and it's going to open up the answer to whatever height it needs to accommodate all of the content inside of your answer. We're going to be writing our script in such a way that you can add any number of questions and answers to a page and each question and answer will function independent of each other.

Watch this entire course now —plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Create an Expandable FAQ Listing with jQuery
40m 18s Intermediate Apr 05, 2012

Viewers: in countries Watching now:

Frequently asked questions (FAQs) are a popular aspect of any web site. This course shows how to create questions that have expandable and collapsible answers, allowing visitors to easily find the information they need. Author and jQuery expert Chris Converse shows how to build an FAQ section for your site quickly, using an adaptable combination of HTML, CSS, JavaScript, and jQuery. In addition, the course demonstrates how to automatically link to a specific question, and automatically open the answer, giving you the ability to provide users with a direct answer to their question.

Topics include:
  • Creating project folders
  • Downloading and setting up the Aptana Studio working environment
  • Creating the HTML, CSS, and JavaScript files
  • Activating the FAQ carousel with JavaScript
  • Adding in sample question and answer content
  • Creating CSS rules for graphics
  • Animating the graphic states
Subjects:
Web Web Design Projects
Software:
jQuery
Author:
Chris Converse

Previewing the final project

Hi this is Chris Converse and this is a course on creating an Interactive FAQ for Your Web site. I want to start by showing a copy of the final project we'll be creating in this course. So what we're going to be doing is creating an FAQ that's going to have questions that you can roll your cursor over and get a little help icon. When I click on the actual question, it's going to open the answer, it's going to animate the Q and the A states over on the left-hand side and it's going to open up the answer to whatever height it needs to accommodate all of the content inside of your answer. We're going to be writing our script in such a way that you can add any number of questions and answers to a page and each question and answer will function independent of each other.

We're also going to add in the capability to auto-open one of the answers based on an anchor link. So I'm going to come up here to the URL field here, type in barchart, hit Return and then hit Reload and we can see, we can go to this page and automatically open one of the individual answers as well. Now we are going to be building this using jQuery, which means we're going to get some cross-compatibility across different platforms and devices. So here we are in Windows 7 running IE 9, and I can see the exact same user experience running over here as well.

The icon for the Help is going to look a little bit different than the Macintosh OS, but again users who are used to this particular operating system again will see the Help symbol show up just like they would see in other sites. Click on the individual items again and open up the content that relates to the individual answers. We will also get the same user experience across devices. Let's look at the same experience running over on an iPad, and again tapping on these individual items will open up these pieces as well. So now to illustrate what we're actually going to be building, I want to bring up a sketch. We're going to be building a series of HTML containers that hold questions and answers, so we can write our JavaScript to target the outermost container and then look for elements inside.

We're also going to be using jQuery to inject graphics into each one of these questions, so we don't have to add a graphic for the Q and the A for every question. When the page loads, we're going to inject all of these items based on the number of questions on our HTML markup. So I hope this course sounds interesting to you, and if so, let's get started with the first movie.

There are currently no FAQs about Create an Expandable FAQ Listing with jQuery.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Create an Expandable FAQ Listing with jQuery.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.