initial commit, cuz im getting lost in this
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
(() => {
|
||||
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,
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user