diff options
| author | Mike Greiling <[email protected]> | 2014-05-29 02:36:53 -0500 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-06-07 18:09:53 -0700 |
| commit | bc8e6ffb7d702895296050d2fd8847fb5eed2381 (patch) | |
| tree | 81028c7c9f43c8c5482be3f4aafaaaca8aef0c0b /js | |
| parent | 632313d631b51d96557bb6576c0b41e33cbfb009 (diff) | |
| download | bootstrap-bc8e6ffb7d702895296050d2fd8847fb5eed2381.tar.xz bootstrap-bc8e6ffb7d702895296050d2fd8847fb5eed2381.zip | |
removing this.$element as it is a superfluous copy of this.$scrollElement
Diffstat (limited to 'js')
| -rw-r--r-- | js/scrollspy.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/scrollspy.js b/js/scrollspy.js index db493d7ed..94171bb1b 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -16,15 +16,15 @@ function ScrollSpy(element, options) { var process = $.proxy(this.process, this) - this.$element = $(element).is('body') ? $(window) : $(element) this.$body = $('body') - this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process) + this.$scrollElement = $(element).is('body') ? $(window) : $(element) this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.selector = (this.options.target || '') + ' .nav li > a' this.offsets = [] this.targets = [] this.activeTarget = null + this.$scrollElement.on('scroll.bs.scrollspy', process) this.refresh() this.process() } @@ -36,7 +36,7 @@ } ScrollSpy.prototype.refresh = function () { - var offsetMethod = this.$element[0] == window ? 'offset' : 'position' + var offsetMethod = this.$scrollElement[0] == window ? 'offset' : 'position' this.offsets = [] this.targets = [] |
