diff options
author | XhmikosR <xhmikosr@gmail.com> | 2018-11-24 19:22:59 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2018-11-25 12:46:37 +0300 |
commit | 5c336d0247cd94ed56ac24d941f86325df474313 (patch) | |
tree | 8e905679661cec26543ded7bae9a8d53f5ed6cd9 /js/dist/scrollspy.js | |
parent | fdc5c1f49ab3f826fcff79c78fc0fd9adf19a6fb (diff) |
Dist
Diffstat (limited to 'js/dist/scrollspy.js')
-rw-r--r-- | js/dist/scrollspy.js | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js index 9394a79be5..e2f5779cca 100644 --- a/js/dist/scrollspy.js +++ b/js/dist/scrollspy.js @@ -63,13 +63,6 @@ } /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.3): scrollspy.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ - - /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ @@ -277,12 +270,10 @@ this._clear(); - var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style - - - queries = queries.map(function (selector) { - return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]"); + var queries = this._selector.split(',').map(function (selector) { + return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; }); + var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { @@ -304,8 +295,11 @@ }; _proto._clear = function _clear() { - var nodes = [].slice.call(document.querySelectorAll(this._selector)); - $(nodes).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) { + return node.classList.contains(ClassName.ACTIVE); + }).forEach(function (node) { + return node.classList.remove(ClassName.ACTIVE); + }); }; // Static |