diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-04-08 10:58:53 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-04-08 10:58:53 -0400 |
commit | e1702c4100ae51172be82b2f068ceab30109214c (patch) | |
tree | 1c47abf5190af3d2b2e49d721024db2c5d1be6c5 /public/js/app.js | |
parent | b05c6ae81989b2a79df0172dde6b66632f22acea (diff) | |
download | thedroneely.com-e1702c4100ae51172be82b2f068ceab30109214c.tar.gz thedroneely.com-e1702c4100ae51172be82b2f068ceab30109214c.tar.bz2 thedroneely.com-e1702c4100ae51172be82b2f068ceab30109214c.zip |
public/js/app: Remove active class at top of function;
Diffstat (limited to 'public/js/app.js')
-rw-r--r-- | public/js/app.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/public/js/app.js b/public/js/app.js index 87ade66..c04fcb2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -81,17 +81,17 @@ var navbar = document.getElementById("navbar"); var navbarHeight = navbar.offsetHeight; window.onscroll = function() { + remClass(activeMenu, 'is-active'); + remClass(activeBurger, 'is-active'); + remClass(activeBurgerCompact, 'is-active'); + var currentPosition = window.pageYOffset; if (previousPosition > currentPosition) { - remClass(navbar, 'navbar__headroom') + remClass(navbar, 'navbar__headroom'); } else if (currentPosition > navbarHeight) { - addClass(navbar, 'navbar__headroom') + addClass(navbar, 'navbar__headroom'); } previousPosition = currentPosition; - - remClass(activeMenu, 'is-active'); - remClass(activeBurger, 'is-active'); - remClass(activeBurgerCompact, 'is-active'); }; |