当用户点击关闭btn时,我想关闭模式。正如我所看到的,我需要从modal.js覆盖这部分代码:
hide: function (e) { e && e.preventDefault() var that = this e = $.Event('hide')//if I delete this line modal won't hide this.$element.trigger(e) if (!this.isShown || e.isDefaultPrevented()) return this.isShown = false $('body').removeClass('modal-open') escape.call(this) this.$element.removeClass('in') $.support.transition && this.$element.hasClass('fade') ? hideWithTransition.call(this) : hideModal.call(this)
我在正确的道路上吗?