From 238be65786ab78274dcc59c9de9fab27eec48304 Mon Sep 17 00:00:00 2001 From: Kevin Kirsche Date: Wed, 25 Feb 2015 12:19:11 -0500 Subject: [PATCH] [Ref #15881] Use Explicit Values rather than Chain [Ref #15881] Use Explicit Values for javascript variables rather than chained ones. From https://github.com/twbs/bootstrap/pull/15881#discussion_r25330647 --- js/affix.js | 4 ++-- js/carousel.js | 8 ++++---- js/modal.js | 2 +- js/tooltip.js | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/affix.js b/js/affix.js index aaebc8c0f6..59584ec855 100644 --- a/js/affix.js +++ b/js/affix.js @@ -21,8 +21,8 @@ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) this.$element = $(element) - this.affixed = - this.unpin = + this.affixed = null + this.unpin = null this.pinnedOffset = null this.checkPosition() diff --git a/js/carousel.js b/js/carousel.js index 450e1812ee..c41a0bcb80 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -17,10 +17,10 @@ this.$element = $(element) this.$indicators = this.$element.find('.carousel-indicators') this.options = options - this.paused = - this.sliding = - this.interval = - this.$active = + this.paused = null + this.sliding = null + this.interval = null + this.$active = null this.$items = null this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) diff --git a/js/modal.js b/js/modal.js index c45437dfbe..929cd991fc 100644 --- a/js/modal.js +++ b/js/modal.js @@ -17,7 +17,7 @@ this.options = options this.$body = $(document.body) this.$element = $(element) - this.$backdrop = + this.$backdrop = null this.isShown = null this.scrollbarWidth = 0 diff --git a/js/tooltip.js b/js/tooltip.js index fb2ff7b9a0..0467c71d18 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -15,11 +15,11 @@ // =============================== var Tooltip = function (element, options) { - this.type = - this.options = - this.enabled = - this.timeout = - this.hoverState = + this.type = null + this.options = null + this.enabled = null + this.timeout = null + this.hoverState = null this.$element = null this.init('tooltip', element, options)