Last updated 8 days ago
Was this helpful?
window.addEventListener('load', () => { setTimeout(() => { const carousels = document.querySelectorAll('.labb-carousel'); carousels.forEach(carousel => { height = carousel.offsetHeight; }); const slides = document.querySelectorAll('.slick-slide'); slides.forEach(slide => { const img = slide.querySelector('.labb-carousel img'); img.style.height = height + 'px'; img.style.width = 'auto'; img.style.objectFit = 'cover'; }); }, 1000); });