Menu icon Foundation
Accordion closed by default

Hi there.

I'm using the foundation accordion but how do i make all the panels closed by default??

Thanks a lot

accordiondefaultclosed

Hi there.

I'm using the foundation accordion but how do i make all the panels closed by default??

Thanks a lot

This post has been closed. No new replies can be added.

Rafi Benkual over 3 years ago

You can remove the active class on the accordion content

<div id="panel1a" class="content active">

Bob Sawyer over 3 years ago

If you look at the first accordion <div>, you'll see that it has the class of "content active". Remove the "active" class, and the first accordion item will be closed.

<ul class="accordion" data-accordion>
  <li class="accordion-navigation">
    <a href="#panel1a">Accordion 1</a>
    <div id="panel1a" class="content active">
      Panel 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    </div>
  </li>

jose diego diaz over 3 years ago

Thaks a lot for Rafi Benkual and Bob Sawyer help it works ....