document.addEventListener("DOMContentLoaded", function () { const urlParams = new URLSearchParams(window.location.search); const category = urlParams.get("category"); if (category) { const target = document.getElementById(category); if (target) { setTimeout(() => { const targetOffset = target.getBoundingClientRect().top + window.scrollY; const centerOffset = window.innerHeight / 2 - target.offsetHeight / 2; window.scrollTo({ top: targetOffset - centerOffset, behavior: 'smooth' }); // Προσθέτει προσωρινό εφέ target.classList.add("highlight-animation"); setTimeout(() => { target.classList.remove("highlight-animation"); }, 1500); }, 300); } } });

Showing all 6 results

×