aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-01-08 14:36:41 -0800
committerJacob Thornton <[email protected]>2012-01-08 14:36:41 -0800
commit76cadd1d2a493d4cbcfe8acd984bd4f908b25abf (patch)
tree1168de15a37308f073f48d00f4a3022ade38f9a6
parent5a33c1b96e13a4650a127b0e81a91eb235561170 (diff)
downloadbootstrap-76cadd1d2a493d4cbcfe8acd984bd4f908b25abf.tar.xz
bootstrap-76cadd1d2a493d4cbcfe8acd984bd4f908b25abf.zip
only append modal to dom if not already present
-rw-r--r--js/bootstrap-modal.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index 98a62865b..670d55c4e 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -51,8 +51,9 @@
backdrop.call(this, function () {
var transition = $.support.transition && that.$element.hasClass('fade')
+ !that.$element.parent() && that.$element.appendTo(document.body) //don't move modals dom position
+
that.$element
- .appendTo(document.body)
.show()
if (transition) {