diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js index 57420bb5d9..2a2b298dca 100644 --- a/js/bootstrap-popover.js +++ b/js/bootstrap-popover.js @@ -72,8 +72,7 @@ } , destroy: function () { - this.hide() - this.$element.off(this.options.ns).removeData('popover') + this.hide().$element.off(this.options.ns).removeData('popover') } }) diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index f22aa8e643..fa1c9a6c53 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -176,6 +176,8 @@ $.support.transition && this.$tip.hasClass('fade') ? removeWithAnimation() : $tip.remove() + + return this } , fixTitle: function () { @@ -236,8 +238,7 @@ } , destroy: function () { - this.hide() - this.$element.off(this.options.ns).removeData('tooltip') + this.hide().$element.off(this.options.ns).removeData('tooltip') } }