aboutsummaryrefslogtreecommitdiff
path: root/docs/dist/js/bootstrap.js
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-09-26 00:10:41 +0200
committerHeinrich Fenkart <[email protected]>2014-09-26 00:10:41 +0200
commit0d04dcaebd7b0b0427ae3a6e79ddd86cd981b58f (patch)
treedf2192bfd0d408932df3351c9ce70e64d46e8a1c /docs/dist/js/bootstrap.js
parent89d437dedac599e0edf2320a55629773f4be1423 (diff)
downloadbootstrap-0d04dcaebd7b0b0427ae3a6e79ddd86cd981b58f.tar.xz
bootstrap-0d04dcaebd7b0b0427ae3a6e79ddd86cd981b58f.zip
grunt
Diffstat (limited to 'docs/dist/js/bootstrap.js')
-rw-r--r--docs/dist/js/bootstrap.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js
index bfcb88c7f..90dc202fa 100644
--- a/docs/dist/js/bootstrap.js
+++ b/docs/dist/js/bootstrap.js
@@ -1317,13 +1317,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (autoPlace) {
var orgPlacement = placement
- var $parent = this.$element.parent()
- var parentDim = this.getPosition($parent)
+ var $container = this.options.container ? $(this.options.container) : this.$element.parent()
+ var containerDim = this.getPosition($container)
- placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
- placement == 'top' && pos.top - parentDim.scroll - actualHeight < parentDim.top ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
- placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - containerDim.scroll > containerDim.height ? 'top' :
+ placement == 'top' && pos.top - containerDim.scroll - actualHeight < containerDim.top ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
placement
$tip