mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Assign event variables at declarations
This commit is contained in:
parent
7a3a88acc6
commit
defe85bb51
8
js/bootstrap-tooltip.js
vendored
8
js/bootstrap-tooltip.js
vendored
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user