fix: fixed issues

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

No files matched your search

+11
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');
}
});