Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2019-03-11 18:13:30 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-03-11 18:59:08 +0300
commitac67e04ce016406377595291ff1357eda63cc311 (patch)
tree4ad39e3b7079bdb0494ed827f90f49dda7b35ee2 /js/dist/scrollspy.js
parentc2b05dd7b5e6e66475dc89de1ca9466c92eb1e90 (diff)
Dist.
Diffstat (limited to 'js/dist/scrollspy.js')
-rw-r--r--js/dist/scrollspy.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js
index ca06e1f554..c1e6d21342 100644
--- a/js/dist/scrollspy.js
+++ b/js/dist/scrollspy.js
@@ -71,7 +71,8 @@
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
- var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+ var _window = window,
+ jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
@@ -102,7 +103,7 @@
try {
return document.querySelector(selector) ? selector : null;
- } catch (err) {
+ } catch (error) {
return null;
}
};
@@ -159,18 +160,15 @@
};
var ClassName = {
DROPDOWN_ITEM: 'dropdown-item',
- DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active'
};
var Selector = {
DATA_SPY: '[data-spy="scroll"]',
- ACTIVE: '.active',
NAV_LIST_GROUP: '.nav, .list-group',
NAV_LINKS: '.nav-link',
NAV_ITEMS: '.nav-item',
LIST_ITEMS: '.list-group-item',
DROPDOWN: '.dropdown',
- DROPDOWN_ITEMS: '.dropdown-item',
DROPDOWN_TOGGLE: '.dropdown-toggle'
};
var OffsetMethod = {
@@ -193,7 +191,7 @@
this._element = element;
this._scrollElement = element.tagName === 'BODY' ? window : element;
this._config = this._getConfig(config);
- this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS);
+ this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " ." + ClassName.DROPDOWN_ITEM);
this._offsets = [];
this._targets = [];
this._activeTarget = null;
@@ -234,7 +232,6 @@
var targetBCR = target.getBoundingClientRect();
if (targetBCR.width || targetBCR.height) {
- // TODO (fat): remove sketch reliance on jQuery position/offset
return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}
}