aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-tooltip.js
diff options
context:
space:
mode:
authorJon Stevens <[email protected]>2012-07-16 16:01:11 -0700
committerJon Stevens <[email protected]>2012-07-16 16:01:11 -0700
commit2ee9b2717bfd532e93eb6d4037ae7ca7a5436957 (patch)
treeb81d60ea33837922facf19963f51bb17a4826d09 /js/bootstrap-tooltip.js
parent40ab928315f4db0566c92b36373ff60b3abfffbc (diff)
downloadbootstrap-2ee9b2717bfd532e93eb6d4037ae7ca7a5436957.tar.xz
bootstrap-2ee9b2717bfd532e93eb6d4037ae7ca7a5436957.zip
namespace the events for popover/tooltip so that they can be cleanly removed. issue #3880
Diffstat (limited to 'js/bootstrap-tooltip.js')
-rw-r--r--js/bootstrap-tooltip.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index f280e3696..02f84d470 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.options.ns, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + this.options.ns, this.options.selector, $.proxy(this.leave, this))
}
this.options.selector ?
@@ -236,7 +236,7 @@
}
, destroy: function () {
- this.$element.off().removeData('tooltip')
+ this.$element.off(this.options.ns).removeData('tooltip')
}
}
@@ -266,6 +266,7 @@
, title: ''
, delay: 0
, html: true
+ , ns: '.tooltip'
}
}(window.jQuery);