Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const section = document.querySelector(".create-doc-mobile.site-section");
- if (window.scrollY > window.innerHeight - 500) {
- section.classList.add("animate-section-button");
- } else {
- section.classList.remove("animate-section-button");
- }
- document.addEventListener("scroll", function() {
- const section = document.querySelector(".create-doc-mobile.site-section");
- if (window.scrollY > window.innerHeight - 500) {
- section.classList.add("animate-section-button");
- } else {
- section.classList.remove("animate-section-button");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement