more js changes

This commit is contained in:
Richard Mikloš 2024-01-25 15:55:21 +01:00
parent c1cc22508d
commit 3a52dd108a

@ -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 {
// Remove the event listener after the first scroll h1.classList.remove('visible');
window.removeEventListener('scroll', handleScroll); h2.classList.remove('visible');
} }
} }