aboutsummaryrefslogtreecommitdiff
path: root/js/src/collapse.js
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2018-01-03 15:40:58 +0100
committerXhmikosR <[email protected]>2018-01-03 16:40:58 +0200
commita1d134f8a8a93ae82f8553674d3c5f8b76c504ad (patch)
tree7a331ae59ead17e3f983c0741da75e1a5c21e81b /js/src/collapse.js
parent7044ea82c17853c4d6d3483114b860ce4a5cf7b1 (diff)
downloadbootstrap-a1d134f8a8a93ae82f8553674d3c5f8b76c504ad.tar.xz
bootstrap-a1d134f8a8a93ae82f8553674d3c5f8b76c504ad.zip
Multiple accordion support (#25161)
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r--js/src/collapse.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index eaad1be54..b0c17112c 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)
}