diff options
| author | Starsam80 <[email protected]> | 2016-10-27 16:13:17 -0600 |
|---|---|---|
| committer | Starsam80 <[email protected]> | 2016-12-07 21:20:15 -0700 |
| commit | bf39bb3ac3d2aef4687b3cd4762015d5f218e2bc (patch) | |
| tree | 968d25a858633f88255e3cc6c923f07a7c44d36c /js/src/tooltip.js | |
| parent | ede925d79bf92d5983a4508c6ed6fda9310e1e8b (diff) | |
| download | bootstrap-bf39bb3ac3d2aef4687b3cd4762015d5f218e2bc.tar.xz bootstrap-bf39bb3ac3d2aef4687b3cd4762015d5f218e2bc.zip | |
Rename `.active` to `.show`
Diffstat (limited to 'js/src/tooltip.js')
| -rw-r--r-- | js/src/tooltip.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index dc291a72c..3fa5ecab4 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -72,8 +72,8 @@ const Tooltip = (($) => { } const HoverState = { - ACTIVE : 'active', - OUT : 'out' + SHOW : 'show', + OUT : 'out' } const Event = { @@ -90,8 +90,8 @@ const Tooltip = (($) => { } const ClassName = { - FADE : 'fade', - ACTIVE : 'active' + FADE : 'fade', + SHOW : 'show' } const Selector = { @@ -208,7 +208,7 @@ const Tooltip = (($) => { } else { - if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) { + if ($(this.getTipElement()).hasClass(ClassName.SHOW)) { this._leave(null, this) return } @@ -303,7 +303,7 @@ const Tooltip = (($) => { Util.reflow(tip) this._tether.position() - $(tip).addClass(ClassName.ACTIVE) + $(tip).addClass(ClassName.SHOW) const complete = () => { const prevHoverState = this._hoverState @@ -336,7 +336,7 @@ const Tooltip = (($) => { throw new Error('Tooltip is transitioning') } const complete = () => { - if (this._hoverState !== HoverState.ACTIVE && tip.parentNode) { + if (this._hoverState !== HoverState.SHOW && tip.parentNode) { tip.parentNode.removeChild(tip) } @@ -356,7 +356,7 @@ const Tooltip = (($) => { return } - $(tip).removeClass(ClassName.ACTIVE) + $(tip).removeClass(ClassName.SHOW) if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { @@ -388,7 +388,7 @@ const Tooltip = (($) => { this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()) - $tip.removeClass(`${ClassName.FADE} ${ClassName.ACTIVE}`) + $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`) this.cleanupTether() } @@ -513,15 +513,15 @@ const Tooltip = (($) => { ] = true } - if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) || - context._hoverState === HoverState.ACTIVE) { - context._hoverState = HoverState.ACTIVE + if ($(context.getTipElement()).hasClass(ClassName.SHOW) || + context._hoverState === HoverState.SHOW) { + context._hoverState = HoverState.SHOW return } clearTimeout(context._timeout) - context._hoverState = HoverState.ACTIVE + context._hoverState = HoverState.SHOW if (!context.config.delay || !context.config.delay.show) { context.show() @@ -529,7 +529,7 @@ const Tooltip = (($) => { } context._timeout = setTimeout(() => { - if (context._hoverState === HoverState.ACTIVE) { + if (context._hoverState === HoverState.SHOW) { context.show() } }, context.config.delay.show) |
