UI Deploy

Curated, Short, Web UI Dev we Love.

Make Your Own Accordion with jQuery

This is a tutorial for beginners with some basic knowledge of HTML and CSS. If you’re more advanced, you might want to look at this one, too.

In this example, let’s say we have a list of questions and answers that we want to show as an accordion. An accordion usually works like this: only the questions are seen, and when you click on one, the answer expands below it. When you click on a different question, the previously shown answer hides and the new answer expands.

view source

Advertisement