diff options
| author | Chris Rebert <[email protected]> | 2014-12-19 18:46:15 -0800 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-12-29 12:34:09 -0800 |
| commit | 05d1877985de2dcd0538f08d7924518eba3dfc22 (patch) | |
| tree | e1b5ebf4ee6fcb24f934bf30bfbd0caf41f871a6 /js/tooltip.js | |
| parent | 654d0dffc9c5d0a1adc903d219fc09d8d6edda05 (diff) | |
| download | bootstrap-05d1877985de2dcd0538f08d7924518eba3dfc22.tar.xz bootstrap-05d1877985de2dcd0538f08d7924518eba3dfc22.zip | |
update JS to use .{tooltip,popover}-{left,right,top,bottom}
Diffstat (limited to 'js/tooltip.js')
| -rw-r--r-- | js/tooltip.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/tooltip.js b/js/tooltip.js index bd376f772..9d3074cc0 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -177,7 +177,7 @@ $tip .detach() .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) + .addClass(this.type + '-' + placement) .data('bs.' + this.type, this) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) @@ -187,7 +187,7 @@ var actualHeight = $tip[0].offsetHeight if (autoPlace) { - var orgPlacement = placement + var origPlacement = placement var $container = this.options.container ? $(this.options.container) : this.$element.parent() var containerDim = this.getPosition($container) @@ -198,8 +198,8 @@ placement $tip - .removeClass(orgPlacement) - .addClass(placement) + .removeClass(this.type + '-' + origPlacement) + .addClass(this.type + '-' + placement) } var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) @@ -283,7 +283,7 @@ var title = this.getTitle() $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') + $tip.removeClass('fade in tooltip-top tooltip-bottom tooltip-left tooltip-right') } Tooltip.prototype.hide = function (callback) { |
