我最近切换到ui-bootstrap来开发一个角度应用程序。使用常规引导,我可以使用以下内容来折叠打开的手风琴。ui-bootstrap 的等效点击事件是什么?
$(document).on('click',function(){
$('.collapse').collapse('hide');
});
我认为这是一个默认的引导功能。只需将in
添加到collapse
类中即可。
您可以在下面使用此代码。
<button class="btn btn-primary" type="button" data-toggle="collapse" data- target="#collapseExample" aria-expanded="true" aria-controls="collapseExample">
Button with data-target
</button>
<div class="collapse in" id="collapseExample">
<div class="well">
asf sdf adsf asdf fd asdf
</div>
</div>
检查此链接...
引导折叠