diff options
author | Mark Otto <otto@github.com> | 2012-10-30 09:01:58 +0400 |
---|---|---|
committer | Mark Otto <otto@github.com> | 2012-10-30 09:01:58 +0400 |
commit | b5af762ef59e1fa97f4386f5feadb67aa5183fef (patch) | |
tree | 3bcd0841e6938379e8c8ae7259ee16f27a49ea41 /docs/assets/js/bootstrap-tooltip.js | |
parent | 7426ced0fb288a9e86f18da1849ad74f652d219a (diff) | |
parent | 68cfedb34af198f178128f8c9bc8ea164e44304a (diff) |
Merge branch '2.1.2-wip'v2.2.0
Conflicts:
js/bootstrap-dropdown.js
Diffstat (limited to 'docs/assets/js/bootstrap-tooltip.js')
-rw-r--r-- | docs/assets/js/bootstrap-tooltip.js | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/docs/assets/js/bootstrap-tooltip.js b/docs/assets/js/bootstrap-tooltip.js index ed62885316..153ecc4074 100644 --- a/docs/assets/js/bootstrap-tooltip.js +++ b/docs/assets/js/bootstrap-tooltip.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-tooltip.js v2.1.1 + * bootstrap-tooltip.js v2.2.0 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== @@ -119,9 +119,9 @@ inside = /in/.test(placement) $tip - .remove() + .detach() .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) + .insertAfter(this.$element) pos = this.getPosition(inside) @@ -144,7 +144,7 @@ } $tip - .css(tp) + .offset(tp) .addClass(placement) .addClass('in') } @@ -166,18 +166,18 @@ function removeWithAnimation() { var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() + $tip.off($.support.transition.end).detach() }, 500) $tip.one($.support.transition.end, function () { clearTimeout(timeout) - $tip.remove() + $tip.detach() }) } $.support.transition && this.$tip.hasClass('fade') ? removeWithAnimation() : - $tip.remove() + $tip.detach() return this } @@ -235,8 +235,9 @@ this.enabled = !this.enabled } - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() + , toggle: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + self[self.tip().hasClass('in') ? 'hide' : 'show']() } , destroy: function () { @@ -269,7 +270,7 @@ , trigger: 'hover' , title: '' , delay: 0 - , html: true + , html: false } -}(window.jQuery); +}(window.jQuery);
\ No newline at end of file |