Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.globalNavigationBar = document.getElementsByTagName("nav")[0];
- window.addEventListener("scroll", function () {
- window.globalNavigationBar.style.top = Math.max(120 - window.scrollY, 0) + "px";
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement