Text Size
Langauge
const filterButtons = document.querySelectorAll(".video-filter-buttons button"); const videos = document.querySelectorAll(".video-folder"); filterButtons.forEach(button => { button.addEventListener("click", function () { filterButtons.forEach(btn => btn.classList.remove("active")); this.classList.add("active"); const filterValue = this.getAttribute("data-filter"); videos.forEach(video => { const videoYear = video.getAttribute("data-year"); if (filterValue === "all" || videoYear === filterValue) { video.style.display = "block"; } else { video.style.display = "none"; } }); }); });