0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

clean up dead elements in firefox (which is droping transitionEnd events :(

This commit is contained in:
Jacob Thornton 2011-12-24 23:06:16 -08:00
parent 4ef5a90445
commit 12868933b9

View File

@ -164,13 +164,20 @@
$tip.removeClass('in')
function removeElement () {
$tip.remove()
function removeWithAnimation() {
var timeout = setTimeout(function () {
$tip.off($.support.transition.end).remove()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
$tip.remove()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
$tip.on($.support.transition.end, removeElement) :
removeElement()
removeWithAnimation() :
$tip.remove()
}
, fixTitle: function () {