From: frntz Date: Tue, 2 Oct 2012 15:26:55 +0000 (+0300) Subject: Update js/bootstrap-tooltip.js X-Git-Tag: v2.2.0^2~12^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5389%2Fhead;p=thirdparty%2Fbootstrap.git Update js/bootstrap-tooltip.js Avoid loosing events attached on Jquery object if added via function in popover content --- diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 14e48c856b..f0b88b5a37 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -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 }