2013-03-29 122 views
0

這很奇怪..我所做的手風琴是從引導頁面直接複製。第一次點擊每個選項卡並展開,然後摺疊它們,它們工作正常......但是,如果您嘗試再次執行操作,則它們不會響應。什麼可能導致這個?這一直讓我發瘋。Bootstrap崩潰工作第一次崩潰,並顯示,但後來不工作

這裏你可以看到這樣一個例子 - http://v2.marlownailandbeauty.co.uk/index.php?option=com_content&view=article&id=18&Itemid=133

標記:

<div class="accordion" id="accordion2"> 
    <div class="accordion-group"> 
     <div class="accordion-heading"><a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"> Collapsible Group Item #1 </a></div> 
     <div id="collapseOne" class="accordion-body collapse in"> 
      <div class="accordion-inner">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="accordion-group"> 
     <div class="accordion-heading"><a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> Collapsible Group Item #2 </a></div> 
     <div id="collapseTwo" class="accordion-body collapse"> 
       <div class="accordion-inner">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="accordion-group"> 
     <div class="accordion-heading"><a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree"> Collapsible Group Item #3 </a></div> 
     <div id="collapseThree" class="accordion-body collapse"> 
      <div class="accordion-inner">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> 
+0

標記肯定會有所幫助。 – Jesse

+0

我不需要添加任何javascript調用,比如$('#myCollapsible')。collapse({ toggle:false })..因爲它都是通過數據切換參數激活的嗎?我猜想某處會出現衝突,但在開發者控制檯上沒有顯示任何錯誤。我很喜歡業餘,雖然:)爲我的媽媽做這個。 –

+0

我是否需要將行爲從'collapse'更改爲'toggle'? (不是我確定如何使用數據屬性設置)。網站上的模式窗口工作正常,底部的導航欄...所有的CSS和JS都被加載。我想我只是沒有設置正確..但我認爲他們的網站上的例子會工作...? –

回答

0

的Joomla包括Mootools的默認情況下,刪除Mootools的解決了這個確切情況我。

您可以刪除Mootools的是這樣的:

<?php $headerstuff = $this->getHeadData(); 
foreach ($headerstuff['scripts'] as $k => $item) { 
    if(stristr($k, 'mootools-core.js')) unset($headerstuff['scripts'][$k]); 
    if(stristr($k, 'mootools-more.js')) unset($headerstuff['scripts'][$k]); 
} 
$this->setHeadData($headerstuff); ?> 

我試圖安裝的jQuery插件,方便,但它並沒有解決問題。