230500
This commit is contained in:
10
backup/public copy/js/scroll.js
Normal file
10
backup/public copy/js/scroll.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function onScroll() {
|
||||
const header = document.getElementById("header")
|
||||
if (window.scrollY > 0) {
|
||||
header.classList.add("scrolled")
|
||||
} else {
|
||||
header.classList.remove("scrolled")
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("scroll", onScroll)
|
||||
Reference in New Issue
Block a user