我的bootstrap有问题。尝试过一切,但没有运气。我的问题是,当我点击按钮时,它会很好地折叠,但是当我点击另一个按钮时,它也会打开但第一个没有关闭。当另一个打开时,我需要关闭按钮。 这里是jsbin:http://jsbin.com/sobahuxabu/1 这是代码:
<div class="container">
<div class="panel panel-success" style="padding-bottom:0px; margin-top:15px;">
<div class="panel-heading"><font size='3'><i><?php echo'Sveikas(-a) atvykęs(-usi), '.$vardas; ?></i></font></div>
<div class="panel-body">
<b>Pasirinkite Paslaugą:</b>
<div class="button-group" id="accordion" aria-multiselectable="false">
<button type="button" class="btn btn-success btn-lg btn-block" aria-pressed="true" data-toggle="collapse" data-target="#collapseOne" data-parent="#accordion" aria-expanded="false" aria-controls="collapseOne" style="margin-bottom: 10px; margin-top:5px;"><img src="img/vip.png" align="left"><b>VIP</b><img src="img/vip.png" align="right"></button>
<div class="btn-collapse collapse" id="collapseOne">
<div class="well">
Norėdami užsisakyti VIP ant nick: <br>
Siųskite žinutę <span class="label label-danger">VIP <?php echo $vardas ?></span> numeriu <span class="label label-danger">1398</span><br>Kaina: <span class="label label-success">1 EUR</span><br></font>
</div>
</div>
<button type="button" class="btn btn-warning btn-lg btn-block" aria-pressed="true" data-toggle="collapse" data-target="#collapseTwo" data-parent="#accordion" aria-expanded="false" aria-controls="collapseTwo" style="margin-bottom: 10px;"><img src="img/Bronze.png" align="left"><b>BronzeVIP</b><img src="img/Bronze.png" align="right"></button>
<div class="btn-collapse collapse" id="collapseTwo">
<div class="well">
Norėdami užsisakyti BronzeVIP ant nick: <br>
Siųskite žinutę <span class="label label-danger">VIP <?php echo $vardas ?></span> numeriu <span class="label label-danger">1398</span><br>Kaina: <span class="label label-success">1 EUR</span><br></font>
</div>
</div>
</div>
不要介意用这些按钮写的任何文字。