Created
August 28, 2020 08:30
-
-
Save yashsharma04/30fb5c47de99b391793ecd8d4092ebcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const paginationComp = document.querySelector(".footer-wrapper"); | |
const ifInViewPort = isInViewport(paginationComp); | |
const scrollBar = document.getElementById("scroll-bar"); | |
if (ifInViewPort) { | |
scrollBar.style.position = "static"; | |
} else { | |
scrollBar.style.position = "fixed"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment