mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-24 03:44:52 +00:00
Initial push of DV8 Expo website
This commit is contained in:
parent
dcc9247ba0
commit
a86816a322
18 changed files with 1075 additions and 0 deletions
15
DV8-Expo/website/static/js/nav.js
Normal file
15
DV8-Expo/website/static/js/nav.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
window.onscroll = () => { scrollFunction() };
|
||||
window.onload = () => { scrollFunction() };
|
||||
|
||||
function scrollFunction() {
|
||||
let nav = document.querySelector("nav");
|
||||
// let scrollHeight = window.innerHeight - nav.offsetHeight;
|
||||
let scrollHeight = 0;
|
||||
|
||||
if (document.body.scrollTop > scrollHeight ||
|
||||
document.documentElement.scrollTop > scrollHeight) {
|
||||
nav.classList.add("scrolled");
|
||||
} else {
|
||||
nav.classList.remove("scrolled");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue