Skip to content

Commit

Permalink
resolves #51 - when scrolling down navbar shrinks sooner to eliminate…
Browse files Browse the repository at this point in the history
… overlap between navbar and header text
  • Loading branch information
TT-- committed Jan 19, 2017
1 parent 0e50e77 commit 74f60d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/cbpAnimatedHeader.js
Expand Up @@ -13,7 +13,7 @@ var cbpAnimatedHeader = (function() {
var docElem = document.documentElement,
header = document.querySelector( '.navbar-fixed-top' ),
didScroll = false,
changeHeaderOn = 300;
changeHeaderOn = 100;

function init() {
window.addEventListener( 'scroll', function( event ) {
Expand Down
2 changes: 1 addition & 1 deletion js/cbpAnimatedHeader.min.js
Expand Up @@ -8,4 +8,4 @@
* Copyright 2013, Codrops
* http://www.codrops.com
*/
var cbpAnimatedHeader=(function(){var b=document.documentElement,g=document.querySelector(".cbp-af-header"),e=false,a=300;function f(){window.addEventListener("scroll",function(h){if(!e){e=true;setTimeout(d,250)}},false)}function d(){var h=c();if(h>=a){classie.add(g,"cbp-af-header-shrink")}else{classie.remove(g,"cbp-af-header-shrink")}e=false}function c(){return window.pageYOffset||b.scrollTop}f()})();
var cbpAnimatedHeader=(function(){var b=document.documentElement,g=document.querySelector(".cbp-af-header"),e=false,a=100;function f(){window.addEventListener("scroll",function(h){if(!e){e=true;setTimeout(d,250)}},false)}function d(){var h=c();if(h>=a){classie.add(g,"cbp-af-header-shrink")}else{classie.remove(g,"cbp-af-header-shrink")}e=false}function c(){return window.pageYOffset||b.scrollTop}f()})();

0 comments on commit 74f60d0

Please sign in to comment.