fix: fixed issues

This commit is contained in:
Aliaksei Karzhou
2024-07-16 20:30:08 +03:00
parent fe2a7463d1
commit 13ed8c0609
6 changed files with 96 additions and 10 deletions

View File

@@ -18,3 +18,14 @@ const phoneInputs = phoneInputClassNames
phoneInputs.forEach((inputElement) => IMask(inputElement, maskOptions));
const goTopButton = document.querySelector('.go-top__button');
document.addEventListener('scroll', () => {
const scrollYPosition = window.scrollY;
if (scrollYPosition >= 800) {
if (goTopButton) goTopButton.classList.add('active');
} else {
if (goTopButton) goTopButton.classList.remove('active');
}
});