| 1 |
window.addEventListener( |
| 2 |
"cbb.carousel.afterInit", |
| 3 |
function ({ detail: { swiper } }) { |
| 4 |
const carouselNode = swiper.el.parentNode; |
| 5 |
if (carouselNode.classList.contains("has-preloader")) { |
| 6 |
let sibling = carouselNode.firstElementChild; |
| 7 |
while (sibling) { |
| 8 |
if (sibling.classList.contains("cbb-loader")) { |
| 9 |
sibling.remove(); |
| 10 |
break; |
| 11 |
} |
| 12 |
sibling = sibling.nextElementSibling; // Move to the next sibling |
| 13 |
} |
| 14 |
} |
| 15 |
}, |
| 16 |
); |
| 17 |
|