我是新手引導,並使用引導手風琴創建了導航菜單。當我點擊任何鏈接時,它將打開手風琴,但不會關閉打開的手風琴。我怎樣才能做到這一點?Bootstrap關閉手風琴菜單
我創建了一個小提琴:http://jsfiddle.net/4qk86/
我的手風琴代碼:
<li>
<div class="accordion-heading "> <a href="#accDash" data-parent="#mainSideMenu" data-toggle="collapse" class="accordion-toggle">
<span class="item-icon fontello-icon-monitor"></span>
<i class="chevron fontello-icon-right-open-3"></i> Dashboards
</a>
</div>
<ul class="accordion-content nav nav-list collapse in" id="accDash">
<li class="active"> <a href="dashboard-one.html">
<i class="fontello-icon-right-dir"></i>
<span class="hidden-tablet">Dashboard</span> Demo 1
</a>
</li>
<li> <a href="dashboard-two.html">
<i class="fontello-icon-right-dir"></i>
<span class="hidden-tablet">Dashboard</span> Demo 2
</a>
</li>
</ul>
</li>
請花時間正確顯示您的代碼,以便其他用戶可以輕鬆閱讀它。目前,閱讀代碼非常困難。 –