Skip to content
Justice Tech School

Project: Accordion

Toggle panels with a click.

Example
$(".acc h3").on("click", function () {
  $(this).next().slideToggle();
  $(this).siblings("h3").next().slideUp();
});

Exercise

Next panel.

$(this).().slideToggle()

Quiz Test

Which method opens the sibling panel?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.