diff options
author | Mark Otto <markdotto@gmail.com> | 2018-01-12 09:42:40 +0300 |
---|---|---|
committer | Mark Otto <markdotto@gmail.com> | 2018-01-12 09:42:40 +0300 |
commit | 6d8d8639f3a290cba93ef406c59ea31ad46e1c6d (patch) | |
tree | afef6ae26f246839effeb0fe894bab25075c7418 /js/dist/scrollspy.js | |
parent | 80d0943b95984bfaf4997d2198d467876d294bd8 (diff) |
dist
Diffstat (limited to 'js/dist/scrollspy.js')
-rw-r--r-- | js/dist/scrollspy.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js index d797466f06..dc75b72cfd 100644 --- a/js/dist/scrollspy.js +++ b/js/dist/scrollspy.js @@ -84,16 +84,16 @@ var ScrollSpy = function ($) { this.refresh(); this._process(); - } // getters + } // Getters var _proto = ScrollSpy.prototype; - // public + // Public _proto.refresh = function refresh() { var _this2 = this; - var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; + var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; this._offsets = []; @@ -112,7 +112,7 @@ var ScrollSpy = function ($) { var targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { - // todo (fat): remove sketch reliance on jQuery position/offset + // TODO (fat): remove sketch reliance on jQuery position/offset return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; } } @@ -140,7 +140,7 @@ var ScrollSpy = function ($) { this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { @@ -244,7 +244,7 @@ var ScrollSpy = function ($) { _proto._clear = function _clear() { $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); - }; // static + }; // Static ScrollSpy._jQueryInterface = function _jQueryInterface(config) { @@ -260,7 +260,7 @@ var ScrollSpy = function ($) { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); |