Remove event parameter
This commit is contained in:
parent
dbfdf9a6fd
commit
3f727a9e8e
|
@ -64,7 +64,7 @@
|
|||
// Make the navigation bar sticky
|
||||
// const hero = document.querySelector(".hero");
|
||||
const navbar = document.querySelector(".navbar");
|
||||
window.addEventListener("scroll", e => {
|
||||
window.addEventListener("scroll", () => {
|
||||
const scrollPos = window.scrollY || document.documentElement.scrollTop;
|
||||
const stickyLine = hero.scrollHeight - navbar.scrollHeight;
|
||||
if (scrollPos > stickyLine) {
|
||||
|
|
Loading…
Reference in New Issue