diff --git a/docs/index.md b/docs/index.md
index 0abe07e..6df6e65 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -11,27 +11,53 @@ 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';
+ }
+});
-