Files
website-cv/js/scroll-hint.js
T
2026-08-09 23:42:23 +02:00

16 lines
479 B
JavaScript

// ── Scroll hint: appears after idling at the top of the page ──
(function () {
const hint = document.getElementById('scrollHint');
if (!hint) return;
const timer = setTimeout(() => {
if (window.scrollY <= 24) hint.classList.add('visible');
}, 3000);
// Any scroll dismisses it for the rest of the visit
window.addEventListener('scroll', () => {
clearTimeout(timer);
hint.classList.remove('visible');
}, { passive: true, once: true });
})();