<ul> <li class="list-down"> <a class="specs-sheet" href="#" onclick="openVideoModal()"> <img class="vid-image" src="Content/Images/uploaded/5504822.png"><br /> <span class="spec-desc">Video</span> </a> </li> </ul> <!-- Video Modal (Hidden Initially) --> <div id="videoModal" class="modal"> <div class="modal-content"> <span class="close" onclick="closeVideoModal()">×</span> <iframe id="youtube-video" width="560" height="315" src="https://www.youtube.com/embed/TcFGH8N5AJc?si=Wyp9UXiibzJuq1kB" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen> </iframe> </div> </div> <script> function openVideoModal() { let modal = document.getElementById("videoModal"); let iframe = document.getElementById("youtube-video"); // Load the video only when the modal is opened iframe.src = "https://www.youtube.com/embed/TcFGH8N5AJc?si=Wyp9UXiibzJuq1kB"; modal.style.display = "flex";}function closeVideoModal() { let modal = document.getElementById("videoModal"); let iframe = document.getElementById("youtube-video"); // Remove the video source to stop playback when closing iframe.src = ""; modal.style.display = "none";} // Ensure modal is completely hidden on page load document.addEventListener("DOMContentLoaded", function () { document.getElementById("videoModal").style.display = "none";}); </script>">