Save 15% on Your Entire Online Order. Use Code 9375. Ends Friday, 11/28/14! View details.

Frequently Asked Questions

     
       
What is jQuery?
       
         

jQuery is an awesome JavaScript library

       
         
Why should I use jQuery?
         

Because it's awesome and it makes writing JavaScript faster and easier

               
Why would I want to hide the answers to my questions?
       
         

To make it easier to peruse the list of available questions - then you simply click to see the answer you're interested in reading.

       
               
What if my answers were a lot longer and more complicated than these examples?
       
         

The great thing about the <dd> element is that it's a block level element that can contain lots of other elements.

         

That means your answer could contain:

         
               
  • Unordered
  •            
  • Lists
  •            
  • with lots
  •            
  • of items
  •            
  • (or ordered lists or even another definition list)
  •          
         

Or it might contain text with lots of special formatting.

         

Other things

         

It can even contain headings. Your answers could take up an entire screen or more all on their own - it doesn't matter since the answer will be hidden until the user wants to see it.

       
               
What if a user doesn't have JavaScript enabled?
       
         

You have two options for users with JavaScript disabled - which you choose might depend on the content of your page.

         

You might just leave the page as it is - and make sure the <dt> tags are styled in a way that makes them stand out and easy to pick up when you're scanning down through the page. This would be a great solution if your answers are relatively short.

         

If your FAQ page has long answers, it might be helpful to put a table of contents list of links to individual questions at the top of the page so users can click it to jump directly to the question and answer they're interested in. This is similar to what we did in the tabbed example, but in this case, we'd use jQuery to hide the table of contents when the page loaded since users with JavaScript wouldn't need to see the table of contents.