mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 05:19:15 +02:00
namespace the events for popover/tooltip so that they can be cleanly removed. issue #3880
This commit is contained in:
7
js/bootstrap-tooltip.js
vendored
7
js/bootstrap-tooltip.js
vendored
@@ -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);
|
||||
|
Reference in New Issue
Block a user