我想創建一個響應式網格來顯示單擊時顯示細節的項目,我可以讓它展開,但我的問題是旁邊的元素被點擊倒塌擴展內容,我不想這樣做,我想保留的所有項目在頂部,並在內容擴展以下如何使用全寬內容創建Bootstrap可摺疊面板而不折疊其他列?
這是我現在有:
$(document).ready(function(){
$("#btn").click(function(){
$("#toggleDemo").collapse('toggle');
});
$("#btn2").click(function(){
$("#toggleDemo2").collapse('toggle');
});
$("#btn3").click(function(){
$("#toggleDemo3").collapse('toggle');
});});
HTML:
<div class="bs-example">
<!-- Trigger Button HTML -->
<input type="button" id="btn" class="btn btn-primary" value="Toggle Button">
<div id="toggleDemo" class="collapse in"><p>This is a simple example of expanding and collapsing individual element via JavaScript. </div>
<input type="button" id="btn2" class="btn btn-primary" value="Toggle Button 2">
<div id="toggleDemo2" class="collapse in"><p>This is a simple example of expanding and collapsing individual element via JavaScript.</div>
<input type="button" id="btn3" class="btn btn-primary" value="Toggle Button 3">
<!-- Collapsible Element HTML -->
<div id="toggleDemo3" class="collapse in"><p>This is a simple example of expanding and collapsing individual element via JavaScript. </div>
如果您有任何關於如何acomplish任何想法,我會apreciate它
PLZ給小提琴演示 – Krish
這裏是Raviteja演示http://jsfiddle.net/iamraviteja/ft4mnynh/2/你可以閱讀爲什麼不爲我的回覆工作 –