我尝试过以下事情,但没有成功:
$(document).on("show.bs.modal",function (event) {...}); $(document).on("show",".bootBox",function (event) {...});
var Box = bootBox.dialog({ message: '',title: '',buttons: {},show: false }); Box.on("shown.bs.modal",function() { alert('it worked!'); }); Box.modal('show');
或者这样:
$(document).on("shown.bs.modal",function (event) {...});