changes to fade out on scroll

This commit is contained in:
Richard Mikloš 2024-01-25 15:54:12 +01:00
parent 1fcbbb0fe4
commit c1cc22508d
2 changed files with 4 additions and 4 deletions

@ -19,9 +19,9 @@ document.addEventListener('DOMContentLoaded', function () {
if (isInViewport(headerText)) { if (isInViewport(headerText)) {
h1.classList.add('visible'); h1.classList.add('visible');
h2.classList.add('visible'); h2.classList.add('visible');
} else {
h1.classList.remove('visible'); // Remove the event listener after the first scroll
h2.classList.remove('visible'); window.removeEventListener('scroll', handleScroll);
} }
} }

@ -1,5 +1,5 @@
body { body {
height: 200% !important; height: 200vh !important;
} }
.user-index-header-text { .user-index-header-text {