title: Accordion doesn't open properly
body: <p>I have this accordion. Everything is ok except opening. When I press one, it opens both. I need to open just that one which I click and when I click second I want to hide first. Need to make it toggle</p>
  <p>When I change display:flex to column it works properly but in row it opens both on click. It doesn't make sense for me what is logic behind it.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  $(document).ready(function(){
    $('.accordion-list &gt; li &gt; .answer').hide();
      
    $('.accordion-list &gt; li').click(function() {
      if ($(this).hasClass("active")) {
        $(this).removeClass("active").find(".answer").slideUp();
      } else {
        $(".accordion-list &gt; li.active .answer").slideUp();
        $(".accordion-list &gt; li.active").removeClass("active");
        $(this).addClass("active").find(".answer").slideDown();
      }
      return false;
    });
    
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>ul.accordion-list {
      position: relative;
      display: flex;
      flex-direction: row;
      width: 100%;
      height: auto;
      padding: 20px;
      margin: 0;
      list-style: none;
      background-color: #f9f9fa;
    }
    ul.accordion-list li {
      position: relative;
      display: block;
      width: 100%;
      height: auto;
      background-color: #F36F20;
      padding: 20px;
      margin: 0 auto 15px auto;
      border: 1px solid #eee;
      border-radius: 5px;
      cursor: pointer;
      color: #fff;
    }
    ul.accordion-list li.active h3:after {
      transform: rotate(45deg);
    }
    ul.accordion-list li h3 {
      font-weight: 700;
      position: relative;
      display: block;
      width: 100%;
      height: auto;
      padding: 0 0 0 0;
      margin: 0;
      font-size: 15px;
      letter-spacing: 0.01em;
      cursor: pointer;
    }
  
    ul.accordion-list li div.answer {
      position: relative;
      display: block;
      width: 100%;
      height: auto;
      margin: 0;
      padding: 0;
      cursor: pointer;
    }
    ul.accordion-list li div.answer p {
      position: relative;
      display: block;
      font-weight: 300;
      padding: 10px 0 0 0;
      cursor: pointer;
      line-height: 150%;
      margin: 0 0 15px 0;
      font-size: 14px;
    }
    </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;ul class="accordion-list"&gt;
              &lt;li&gt;
                &lt;h3&gt;info&lt;/h3&gt;
                &lt;div class="answer"&gt;
                  &lt;table style="width: 100%; text-align: center;"&gt;
                      &lt;tr style="background-color: #F36F20; color: #fff;"&gt;
                          &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkjkj&lt;/td&gt;
                          &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjjkjk&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjjkkj:&lt;/td&gt;
                          &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjk&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr style="background-color: #F36F20; color: #fff;"&gt;
                          &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkjk:&lt;/td&gt;
                          &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjk&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkj:&lt;/td&gt;
                          &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjkj&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr style="background-color: #F36F20; color: #fff;"&gt;
                          &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkjkj:&lt;/td&gt;
                          &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjk&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkjkj&lt;/td&gt;
                          &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjkjj,00€&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;                  
                &lt;/div&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;second&lt;/h3&gt;
                  &lt;div class="answer"&gt;
                      &lt;table style="width: 100%; text-align: center;"&gt;
                          &lt;tr style="background-color: #F36F20; color: #fff;"&gt;
                              &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkj&lt;/td&gt;
                              &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjkjk&lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;jkkjk&lt;/td&gt;
                              &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;kjkjlj&lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr style="background-color: #F36F20; color: #fff;"&gt;
                              &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;kjkljlk&lt;/td&gt;
                              &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;jlklkjljk€&lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td class="cell" style="float: left; padding-left: 1rem;"&gt;ljklkjljk:&lt;/td&gt;
                              &lt;td class="cell" style="float: right; padding-right: 1rem;"&gt;20.12.2025&lt;/td&gt;
                          &lt;/tr&gt;
      
                      &lt;/table&gt;                 
                  &lt;/div&gt;
                &lt;/li&gt;
          &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>