mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-22 18:25:48 +00:00
Just find the active indicator
This commit is contained in:
parent
a882614c45
commit
e79c8f3489
1 changed files with 3 additions and 5 deletions
|
|
@ -406,12 +406,10 @@ class Carousel extends BaseComponent {
|
||||||
|
|
||||||
_setActiveIndicatorElement(element) {
|
_setActiveIndicatorElement(element) {
|
||||||
if (this._indicatorsElement) {
|
if (this._indicatorsElement) {
|
||||||
const activeIndicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement)
|
const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)
|
||||||
|
|
||||||
for (let i = 0; i < activeIndicators.length; i++) {
|
activeIndicator.classList.remove(CLASS_NAME_ACTIVE)
|
||||||
activeIndicators[i].classList.remove(CLASS_NAME_ACTIVE)
|
activeIndicator.removeAttribute('aria-current')
|
||||||
activeIndicators[i].removeAttribute('aria-current')
|
|
||||||
}
|
|
||||||
|
|
||||||
const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)
|
const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue