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