diff options
author | Martijn Cuppens <martijn.cuppens@gmail.com> | 2018-01-03 17:40:58 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2018-01-03 17:40:58 +0300 |
commit | a1d134f8a8a93ae82f8553674d3c5f8b76c504ad (patch) | |
tree | 7a331ae59ead17e3f983c0741da75e1a5c21e81b /js/src/collapse.js | |
parent | 7044ea82c17853c4d6d3483114b860ce4a5cf7b1 (diff) |
Multiple accordion support (#25161)
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r-- | js/src/collapse.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js index eaad1be541..b0c17112c6 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -83,6 +83,7 @@ const Collapse = (($) => { const elem = tabToggles[i] const selector = Util.getSelectorFromElement(elem) if (selector !== null && $(selector).filter(element).length > 0) { + this._selector = selector this._triggerArray.push(elem) } } @@ -141,7 +142,7 @@ const Collapse = (($) => { } if (actives) { - activesData = $(actives).data(DATA_KEY) + activesData = $(actives).not(this._selector).data(DATA_KEY) if (activesData && activesData._isTransitioning) { return } @@ -154,7 +155,7 @@ const Collapse = (($) => { } if (actives) { - Collapse._jQueryInterface.call($(actives), 'hide') + Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide') if (!activesData) { $(actives).data(DATA_KEY, null) } |