mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-28 06:20:15 +02:00
Multiple accordion support (#25161)
This commit is contained in:
committed by
XhmikosR
parent
7044ea82c1
commit
a1d134f8a8
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user