This commit is contained in:
@@ -11,13 +11,16 @@ title: Start
|
|||||||
window.scrollTo({ top: y, behavior: 'smooth' });
|
window.scrollTo({ top: y, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Göm knappen vid scroll
|
window.addEventListener('scroll', () => {
|
||||||
window.addEventListener('scroll', () => {
|
const button = document.getElementById('scrollButton');
|
||||||
const button = document.getElementById('scrollButton');
|
if (window.scrollY > 10) {
|
||||||
if (window.scrollY > 10) {
|
button.style.opacity = '0';
|
||||||
button.style.display = 'none';
|
button.style.pointerEvents = 'none';
|
||||||
}
|
} else {
|
||||||
});
|
button.style.opacity = '1';
|
||||||
|
button.style.pointerEvents = 'auto';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -39,4 +39,8 @@
|
|||||||
.md-header,
|
.md-header,
|
||||||
.md-tabs {
|
.md-tabs {
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scrollButton {
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user