简体   繁体   English

如何设置第一手风琴面板关闭?

[英]how to set first accordion panel to close?

I have 5 accordions and data under each accordion but wat i need is that the all the accordion has to be closed first and when i click the accordion then i need it to be opened. 我在每个手风琴下都有5个手风琴和数据,但我需要的是首先必须关闭所有手风琴,并且当我单击手风琴时才需要将其打开。

  <div class="panel panel-default" style="  background: rgba(0,0,0,0.1)">
<div class="panel-heading"  style="background:rgba(0,0,0,0.7);">
  <a data-toggle="collapse" data-parent="#accordion" href="#collapse2">
    <h4 class="panel-title">SUPPLIERS <b class="closed"></b>
    </h4>
  </a>
</div>
<div id="collapse2" class="panel-collapse collapse">
  <div class="panel-body">
      <p class="title"> > BP</p>
     <p class="title"> > CHEVERON </p>
      <p class="title"> > CITGO </p>
       <p class="title"> > EXOON </p>
  </div>
</div>

This is the code sample for the first accordion is there anyway to close the first accordion and open it only on click? 这是第一手风琴的代码示例,是否可以关闭第一手风琴并仅在单击时打开它?

您需要从手风琴折叠中删除课程。

<div id="collapse1" class="accordion-body collapse">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM