more js changes
This commit is contained in:
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user