diff options
| author | ♒∆✝ <[email protected]> | 2012-07-22 14:40:09 -0700 |
|---|---|---|
| committer | ♒∆✝ <[email protected]> | 2012-07-22 14:40:09 -0700 |
| commit | 48fc0ad56953f260b0f926f0fd7564e75cd9e9f9 (patch) | |
| tree | ff8aa6bded07f4cf58633213e6eb7192f07d9920 /js/bootstrap-tooltip.js | |
| parent | e9f374f04175820d254cfbcf619908e6ac1493ed (diff) | |
| parent | d76c8991424b91050636fb94e740daa123306e95 (diff) | |
| download | bootstrap-48fc0ad56953f260b0f926f0fd7564e75cd9e9f9.tar.xz bootstrap-48fc0ad56953f260b0f926f0fd7564e75cd9e9f9.zip | |
Merge pull request #4104 from lookfirst/2.1.0-wip-fix-destroy
namespace the events for popover/tooltip
Diffstat (limited to 'js/bootstrap-tooltip.js')
| -rw-r--r-- | js/bootstrap-tooltip.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index f280e3696..f9447410e 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -47,8 +47,8 @@ if (this.options.trigger != 'manual') { eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' - this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this)) + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) } this.options.selector ? @@ -176,6 +176,8 @@ $.support.transition && this.$tip.hasClass('fade') ? removeWithAnimation() : $tip.remove() + + return this } , fixTitle: function () { @@ -236,7 +238,7 @@ } , destroy: function () { - this.$element.off().removeData('tooltip') + this.hide().$element.off('.' + this.type).removeData(this.type) } } |
