答案 0 :(得分:2)
只需将data-dismiss="modal"
添加到您的launch2按钮,例如<a data-toggle="modal" href="#myModal2" class="btn btn-primary" data-dismiss="modal">Launch modal</a>
答案 1 :(得分:0)
试试这个:
$('#myModal a[href=#myModal2]').on("click",function(){
$('#myModal a[data-dismiss=modal]').click();
});
分叉bootply:http://www.bootply.com/HYJ57p1wBy