0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Update js/bootstrap-tooltip.js

Avoid loosing events attached on Jquery object if added via function in popover content
This commit is contained in:
frntz 2012-10-02 18:26:55 +03:00
parent 7c9597f4e7
commit b892a37320

View File

@ -119,7 +119,7 @@
inside = /in/.test(placement)
$tip
.remove()
.detach()
.css({ top: 0, left: 0, display: 'block' })
.insertAfter(this.$element)
@ -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
}