Ui-Bootstrap 文件点击手风琴折叠
Ui-Bootstrap document click Accordion collapse
我最近为 angular 应用切换到 ui-bootstrap。使用常规 bootstrap,我可以使用以下内容折叠打开的手风琴。 ui-bootstrap 的 equivalent 点击事件是什么?
$(document).on('click',function(){
$('.collapse').collapse('hide');
});
我认为这是默认的 bootstrap 功能。只需将 in
添加到 collapse
class。
您可以使用下面的代码。
<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>
检查此 link...
bootstrap collapse
我最近为 angular 应用切换到 ui-bootstrap。使用常规 bootstrap,我可以使用以下内容折叠打开的手风琴。 ui-bootstrap 的 equivalent 点击事件是什么?
$(document).on('click',function(){
$('.collapse').collapse('hide');
});
我认为这是默认的 bootstrap 功能。只需将 in
添加到 collapse
class。
您可以使用下面的代码。
<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>
检查此 link...
bootstrap collapse