Jonas232005 (Talk | contribs) |
Jonas232005 (Talk | contribs) |
||
Line 1,673: | Line 1,673: | ||
}); | }); | ||
}; | }; | ||
+ | |||
+ | //navbar on scroll | ||
+ | |||
+ | var top = document.querySelector("#my-top"); | ||
+ | window.addEventListener("scroll", ()=>{ | ||
+ | top.classList.toggle("onscroll", window.scrollY > 300); | ||
+ | }); | ||
//bottle navigation | //bottle navigation |
Revision as of 07:22, 3 October 2021