From fd6d134fbf199441da9c464b14c83a47dfc96218 Mon Sep 17 00:00:00 2001 From: sa6anw Date: Fri, 9 May 2025 17:27:31 +0000 Subject: [PATCH] Fix --- docs/index.md | 17 ++++++++++------- docs/stylesheets/extra.css | 6 +++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/index.md b/docs/index.md index f369ae2..ddc0645 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,13 +11,16 @@ title: Start window.scrollTo({ top: y, behavior: 'smooth' }); } - // Göm knappen vid scroll - window.addEventListener('scroll', () => { - const button = document.getElementById('scrollButton'); - if (window.scrollY > 10) { - button.style.display = 'none'; - } - }); +window.addEventListener('scroll', () => { + const button = document.getElementById('scrollButton'); + if (window.scrollY > 10) { + button.style.opacity = '0'; + button.style.pointerEvents = 'none'; + } else { + button.style.opacity = '1'; + button.style.pointerEvents = 'auto'; + } +});