版权声明:Copyright© 2017 Matt.Jason.Lu, Allrights Reserved. https://blog.csdn.net/lujiachun1/article/details/86690182
多模态框,先前模态框无法滑动
增加以下语句即可解决
// 覆盖Modal.prototype的hideModal方法
$.fn.modal.Constructor.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
//判断当前页面所有的模态框都已经隐藏了之后body移除.modal-open,即body出现滚动条。
$('.modal.fade.in').length === 0 && that.$body.removeClass('modal-open');
that.resetAdjustments();
that.resetScrollbar();
that.$element.trigger('hidden.bs.modal')
})
};