diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index e0b77bf251f7..5c4738f7b3d3 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -82,7 +82,7 @@ escape.call(this) backdrop.call(this, function () { that.$element - .appendTo(document.body) + .appendTo(that.settings.parent || document.body) .show() if ($.support.transition && that.$element.hasClass('fade')) { @@ -137,7 +137,7 @@ var doAnimate = $.support.transition && animate this.$backdrop = $('
') - .appendTo(document.body) + .appendTo(that.settings.parent || document.body) if ( this.settings.backdrop != 'static' ) { this.$backdrop.click($.proxy(this.hide, this))