Jonas232005 (Talk | contribs) |
Jonas232005 (Talk | contribs) |
||
Line 1,764: | Line 1,764: | ||
<script> | <script> | ||
window.onload = function () { | window.onload = function () { | ||
+ | |||
+ | var top = document.querySelector("#my-top"); | ||
+ | window.addEventListener("scroll", ()=>{ | ||
+ | top.classList.toggle("onscroll", window.scrollY > 300); | ||
+ | }); | ||
//original navigation | //original navigation |
Revision as of 07:25, 11 October 2021