29 lines
908 B
JavaScript
29 lines
908 B
JavaScript
(() => {
|
|
const allBanners = document.querySelectorAll(`
|
|
.vc-content_slidebanner .owl-carousel .owl-stage .owl-item:not(.cloned) .item img,
|
|
.vc-content_slidebanner .owl-carousel > .item:not(.cloned) img
|
|
`);
|
|
|
|
const allBannersResponsive = document.querySelectorAll(`
|
|
.vc-content_slidebanner--responsive .owl-carousel .owl-stage .owl-item:not(.cloned) .item img,
|
|
.vc-content_slidebanner--responsive .owl-carousel > .item:not(.cloned) img
|
|
`);
|
|
|
|
const banners = Array.from(allBanners).map((banner) => {
|
|
const src = banner.getAttribute("data-src");
|
|
const alt = banner.getAttribute("alt");
|
|
return { src, alt };
|
|
});
|
|
|
|
const bannersResponsive = Array.from(allBannersResponsive).map((banner) => {
|
|
const src = banner.getAttribute("data-src");
|
|
const alt = banner.getAttribute("alt");
|
|
return { src, alt };
|
|
});
|
|
|
|
return {
|
|
banners,
|
|
bannersResponsive,
|
|
}
|
|
})();
|