1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 13:46:42 +02: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') $tip.removeClass('in')
function removeElement () { function removeWithAnimation() {
$tip.remove() 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') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip.on($.support.transition.end, removeElement) : removeWithAnimation() :
removeElement() $tip.remove()
} }
, fixTitle: function () { , fixTitle: function () {