From: KAWACHI Takashi Date: Sun, 23 Dec 2012 06:17:41 +0000 (+0900) Subject: Assign event variables at declarations X-Git-Tag: v2.3.0^2~63^2~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6375%2Fhead;p=thirdparty%2Fbootstrap.git Assign event variables at declarations --- diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 2a79490b16..8c86733877 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -110,10 +110,10 @@ , actualHeight , placement , tp - , e + , e = $.Event('show') if (this.hasContent() && this.enabled) { - this.$element.trigger(e = $.Event('show')) + this.$element.trigger(e) if (e.isDefaultPrevented()) return $tip = this.tip() this.setContent() @@ -171,9 +171,9 @@ , hide: function () { var that = this , $tip = this.tip() - , e + , e = $.Event('hide') - this.$element.trigger(e = $.Event('hide')) + this.$element.trigger(e) if (e.isDefaultPrevented()) return $tip.removeClass('in')