Initial commit
This commit is contained in:
9
themes/coopgo-theme/assets/js/main.js
Normal file
9
themes/coopgo-theme/assets/js/main.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function navbarToggleOnScroll() {
|
||||
var el = document.getElementById("navbar");
|
||||
if (window.pageYOffset >= 500) {
|
||||
el.classList.add("scroll");
|
||||
} else {
|
||||
el.classList.remove("scroll");
|
||||
}
|
||||
};
|
||||
window.addEventListener("scroll", navbarToggleOnScroll);
|
||||
Reference in New Issue
Block a user