diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-08-09 02:39:30 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-08-09 02:39:30 -0400 |
commit | c9561f551aee8aa031fbb97788268aa6e3041667 (patch) | |
tree | 2e6f348f166f5ef6a01f21edc60d26c8605131e8 /public/js/app.js | |
parent | 30d42f55f7df095c97a52acca302a7fe23529645 (diff) | |
download | thedroneely.com-c9561f551aee8aa031fbb97788268aa6e3041667.tar.gz thedroneely.com-c9561f551aee8aa031fbb97788268aa6e3041667.tar.bz2 thedroneely.com-c9561f551aee8aa031fbb97788268aa6e3041667.zip |
public/js/app: Re enable dynamic navigation bar
Diffstat (limited to 'public/js/app.js')
-rw-r--r-- | public/js/app.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/public/js/app.js b/public/js/app.js index e5a26ab..7d5b611 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -94,16 +94,16 @@ window.onscroll = function() { remClass(activeBurger, 'is-active'); remClass(activeBurgerCompact, 'is-active'); - //var currentPosition = window.pageYOffset; - //var velocity = previousPosition - currentPosition; + var currentPosition = window.pageYOffset; + var velocity = previousPosition - currentPosition; - //if (velocity > 55 || currentPosition < navbarHeight) { - // remClass(navbar, 'navbar__headroom'); - //} else if (velocity < 0) { - // addClass(navbar, 'navbar__headroom'); - //} + if (velocity > 55 || currentPosition < navbarHeight) { + remClass(navbar, 'navbar__headroom'); + } else if (velocity < 0) { + addClass(navbar, 'navbar__headroom'); + } - //previousPosition = currentPosition; + previousPosition = currentPosition; }; |