【发布时间】:2015-01-16 15:14:07
【问题描述】:
我有两个引导选项卡,每个选项卡上都有一个手风琴。
根据设计,当我单击手风琴标题时,面板应该会像当前一样下拉。但是,手风琴标题需要隐藏。单击正文后,正文应回滚,标题应重新出现。
我现在构建它的方式,如果我点击标题,正文就会正确显示。但是,如果我单击正文,正文会消失,并且标题不会重新显示。我需要标题重新出现并能够重新开始整个过程。
我已经包含了我的标记、jquery 和两个屏幕截图。谢谢
<div class="panel-heading" role="tab" id="headingForensic">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseForensic" aria-expanded="true" aria-controls="collapseOne">
<h4 class="panel-title">
<img src="img/service_icons/forensic_icon.png"class="accordianImage"> FORENSIC COLLECTION
<img src="img/service_icons/arrow_left.png"class="accordianImage pull-right">
</h4>
</a>
</div>
<div id="collapseForensic" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body">
<div class="row">
<div class="col-md-4">
<img src="img/service_icons/security_icon_large.png"class="accordianImage">
</div>
<div class="col-md-8">
<a id="#openForensic" data-toggle="collapse" data-parent="#accordion" href="#collapseForensic" aria-expanded="true" aria-controls="collapseOne" ><h3>FORENSIC COLLECTION<img src="img/service_icons/arrow_down.png"class="accordianImage pull-right"> </h3></a>
<p>Security is as much about the small details as it is the big picture. An employee losing a flash drive with sensitive documents stored on it constitutes as much a breach of security as a theft. How do you best protect against these and other types of security breaches? We can show you. Whether you’re at the beginning of litigation or in the middle of an investigation, we can help you make sure that all your information stays safe.
</p>
</div>
</div>
</div>
</div>
$( document ).ready(function() {
$("#headingForensic").click(function(){
$("#headingForensic").hide();
});
$("#openForensic").click(function(){
$("#headingForensic").show();
});
});
【问题讨论】:
标签: jquery twitter-bootstrap-3