]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Update js/bootstrap-tooltip.js 5389/head
authorfrntz <frantzy@gmail.com>
Tue, 2 Oct 2012 15:26:55 +0000 (18:26 +0300)
committerfrntz <frantzy@gmail.com>
Tue, 2 Oct 2012 15:26:55 +0000 (18:26 +0300)
Avoid loosing events attached on Jquery object if added via function in popover content

js/bootstrap-tooltip.js

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