diff options
| author | Jacob Thornton <[email protected]> | 2015-08-12 21:17:43 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2015-08-12 21:17:43 -0700 |
| commit | 17ba95c201f16c19e6fd4d6bb36332e742930952 (patch) | |
| tree | 9906b034dd70f35cc4c9126f5440e06d07a98b23 /docs/dist/js/umd/scrollspy.js | |
| parent | f2ae3ea04309cabedabf8160c771b6b465c912e6 (diff) | |
| download | bootstrap-17ba95c201f16c19e6fd4d6bb36332e742930952.tar.xz bootstrap-17ba95c201f16c19e6fd4d6bb36332e742930952.zip | |
rebuild stuff
Diffstat (limited to 'docs/dist/js/umd/scrollspy.js')
| -rw-r--r-- | docs/dist/js/umd/scrollspy.js | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/docs/dist/js/umd/scrollspy.js b/docs/dist/js/umd/scrollspy.js index 8c53526c4..720640fb3 100644 --- a/docs/dist/js/umd/scrollspy.js +++ b/docs/dist/js/umd/scrollspy.js @@ -58,7 +58,7 @@ var Event = { ACTIVATE: 'activate' + EVENT_KEY, SCROLL: 'scroll' + EVENT_KEY, - LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY + LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY }; var ClassName = { @@ -92,7 +92,7 @@ this._element = element; this._scrollElement = element.tagName === 'BODY' ? window : element; this._config = this._getConfig(config); - this._selector = '' + this._config.target + ' ' + Selector.NAV_ANCHORS; + this._selector = this._config.target + ' ' + Selector.NAV_ANCHORS; this._offsets = []; this._targets = []; this._activeTarget = null; @@ -104,6 +104,14 @@ this._process(); } + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + // getters + _createClass(ScrollSpy, [{ key: 'refresh', @@ -161,11 +169,11 @@ this._activeTarget = null; this._scrollHeight = null; } - }, { - key: '_getConfig', // private + }, { + key: '_getConfig', value: function _getConfig(config) { config = $.extend({}, Default, config); @@ -232,7 +240,7 @@ this._clear(); - var selector = '' + this._selector + '[data-target="' + target + '"],' + ('' + this._selector + '[href="' + target + '"]'); + var selector = this._selector + '[data-target="' + target + '"],' + (this._selector + '[href="' + target + '"]'); // todo (fat): getting all the raw li's up the tree is not great. var parentListItems = $(selector).parents(Selector.LI); @@ -261,11 +269,11 @@ $(activeParents[i]).removeClass(ClassName.ACTIVE); } } - }], [{ - key: '_jQueryInterface', // static + }], [{ + key: '_jQueryInterface', value: function _jQueryInterface(config) { return this.each(function () { var data = $(this).data(DATA_KEY); @@ -283,15 +291,12 @@ } }, { key: 'VERSION', - - // getters - - get: function () { + get: function get() { return VERSION; } }, { key: 'Default', - get: function () { + get: function get() { return Default; } }]); @@ -299,12 +304,6 @@ return ScrollSpy; })(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - $(window).on(Event.LOAD_DATA_API, function () { var scrollSpys = $.makeArray($(Selector.DATA_SPY)); |
