Scroll to Top
document.addEventListener("DOMContentLoaded", function () { const video = document.querySelector(".elementor-background-video-hosted"); if (video) { const url = video.getAttribute("data-src") || video.getAttribute("data-lazy-src"); if (url && !video.getAttribute("src")) { video.setAttribute("src", url); video.load(); // Optional: mark as loaded when video starts playing video.addEventListener("canplaythrough", function () { const wrapper = video.closest(".video-hero-wrapper"); if (wrapper) { wrapper.classList.add("video-loaded"); } }); } } });