diff --git a/docs/index.md b/docs/index.md index 577715b..0abe07e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,6 +11,15 @@ 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'; + } + }); + + - // Göm knappen vid scroll - window.addEventListener('scroll', () => { - const button = document.getElementById('scrollButton'); - if (window.scrollY > 10) { - button.style.display = 'none'; - } - }); - -