引导手风琴菜单打开和关闭问题

问题描述:

我已经集成自举手风琴菜单到我的网站Click here引导手风琴菜单打开和关闭问题

这个问题我有当一个切换是打开其他切换不会关闭 我假定这是一个CSS问题,因为我不能想出任何额外的属性,我需要适用于我的HTML为了得到这项工作。

在当切换菜单被折叠的CSS属性的时刻去

.collapse .in { display: block } 

        <article class="panel-heading" role="tab" data-toggle="collapse" data-parent="#accordion" href="#NewsFive" aria-expanded="true" aria-controls="collapseFive"> 
        <div class="panel-heading-date"> 
         <span>06/10/2016</span> 
        </div> 
        <div class="panel-title panel-news"> 
          <article> 

          </article> 
        </div> 
       </article> 
       <!-- PANEL HEADING ENDS HERE --> 
       <div id="NewsFive" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingFive"> 

        <div class="video-wrapper"> 
           <source src="/assets/videos/the-future-of-retail.mp4" type="video/mp4"> 
         </video> 
        </div> 
        <div class="playpause"></div> 
       </div> 
      </div><!-- PANEL ENDS HERE --> 

只是想知道如果任何人能发现任何可能导致此问题

+0

我可以知道确切的问题,我观察到手风琴工作正常。你想要切换选项吗? (当点击第一手风琴标签时,第二手风琴标签将关闭) –

+0

手风琴正常工作。我在打开一个切换时遇到的问题另一个切换不会关闭 – NewBoy

+0

请检查您提供的html代码,因为它存在很多错误 – DestinatioN

是发生因小姐匹配这个问题标签标题和标签内容的ID。

请检查手风琴仔细还有咏叹调的控件= “collapseOne”ARIA-labelledby = “headingOne”都必须匹配。

#accordion .panel-heading { padding: 0;} 
 
#accordion .panel-title > a { 
 
\t display: block; 
 
\t padding: 0.4em 0.6em; 
 
    outline: none; 
 
    font-weight:bold; 
 
    text-decoration: none; 
 
} 
 
.panel-group { 
 
    position: relative; 
 
} 
 
.panel-heading-date { 
 
    position: absolute; 
 
    width: 110px; 
 
    background-color: #000; 
 
    color: #fff; 
 
    padding: 18px 0; 
 
    text-align: center; 
 
} 
 
.accordio-panel-title { 
 
    margin-left: 120px; 
 
    padding: 20px 0; 
 
    cursor: pointer; 
 
} 
 
.accordio-panel-title .panel-title { 
 
    font-size: 14px; 
 
    border: 0; 
 
}
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> 
 
<br/> 
 
<div class="container"> 
 
    <div class="row"> 
 
     <div class="col-md-12" id="main"> 
 
      <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> 
 
       <div class="panel panel-default"> 
 
       <div class="panel-heading" role="tab" id="headingOne">     
 
\t \t \t \t \t <div class="panel-heading-date"> 
 
\t \t \t \t \t \t 10/13/2016 
 
\t \t \t \t \t </div> 
 
\t \t \t \t \t <div class="accordio-panel-title" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> 
 
\t \t \t \t \t \t \t <h4 class="panel-title">Collapsible Group Item #1</h4> 
 
\t \t \t \t \t </div> 
 
       </div> 
 
       <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne"> 
 
        <div class="panel-body"> 
 
        <ul> 
 
         <li>The titles are block, so you don't have to click the text part to activate it</li> 
 
         <li>Indicators for expand/collapsing items</li> 
 
         <li>Removed title links' obnoxious :hover underlinings, and outlines.</li> 
 
        </ul> 
 
       </div> 
 
       </div> 
 
       </div> 
 
       <div class="panel panel-default"> 
 
       <div class="panel-heading" role="tab" id="headingTwo"> 
 
\t \t \t \t \t <div class="panel-heading-date"> 
 
\t \t \t \t \t \t 10/13/2016 
 
\t \t \t \t \t </div> 
 
\t \t \t \t \t <div class="accordio-panel-title collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> 
 
\t \t \t \t \t \t  <h4 class="panel-title">Collapsible Group Item #2</h4> 
 
\t \t \t \t \t </div> 
 
       </div> 
 
       <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"> 
 
        <div class="panel-body"> 
 
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 
 
        </div> 
 
       </div> 
 
       </div> 
 
       <div class="panel panel-default"> 
 
       <div class="panel-heading" role="tab" id="headingThree"> 
 
\t \t \t \t \t <div class="panel-heading-date"> 
 
\t \t \t \t \t \t 10/13/2016 
 
\t \t \t \t \t </div> 
 
\t \t \t \t \t <div class="accordio-panel-title collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> 
 
\t \t \t \t \t \t  <h4 class="panel-title">Collapsible G roup Item #3</h4> 
 
\t \t \t \t \t </div>     
 
       </div> 
 
       <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree"> 
 
        <div class="panel-body"> 
 
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 
 
        </div> 
 
       </div> 
 
       </div> 
 
      </div> 
 
     </div> 
 
\t </div> \t 
 
<div>

+0

我已检出您的解决方案,但似乎无法正常工作 – NewBoy

+0

您能否分享您的更新demo.We可以知道发生了什么问题。 –

+0

检查上面的链接 - http://portland-design.com/wp/wp-portland/news-blog/ – NewBoy