Ensuring extra links deletion.
This commit is contained in:
parent
c7bf18b4f9
commit
b18a6b5c57
|
@ -103,6 +103,7 @@ export default class CarouselAd {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const aPrev = this.retrieveLinkCarousel()
|
const aPrev = this.retrieveLinkCarousel()
|
||||||
|
const allAnchors = carousel.querySelectorAll('a')
|
||||||
const a = document.createElement('a')
|
const a = document.createElement('a')
|
||||||
a.addEventListener('click', (event: MouseEvent) => {
|
a.addEventListener('click', (event: MouseEvent) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
@ -142,6 +143,9 @@ export default class CarouselAd {
|
||||||
aPrev.classList.add('remove')
|
aPrev.classList.add('remove')
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
aPrev.remove()
|
aPrev.remove()
|
||||||
|
for (const a of allAnchors) {
|
||||||
|
a.remove()
|
||||||
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue