Merge pull request #42 from jamlamberti/fix-animatedheader

Added in scrollpage call from AnimateHeader update
This commit is contained in:
David Miller 2016-02-08 14:28:11 -05:00
commit 7d7d64472a
2 changed files with 4 additions and 3 deletions

View File

@ -13,9 +13,10 @@ var cbpAnimatedHeader = (function() {
var docElem = document.documentElement,
header = document.querySelector( '.navbar-default' ),
didScroll = false,
changeHeaderOn = 300;
changeHeaderOn = 220;
function init() {
scrollPage();
window.addEventListener( 'scroll', function( event ) {
if( !didScroll ) {
didScroll = true;

View File

@ -8,4 +8,4 @@
* Copyright 2013, Codrops
* http://www.codrops.com
*/
var cbpAnimatedHeader=(function(){var b=document.documentElement,g=document.querySelector(".navbar-default"),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,"navbar-shrink")}else{classie.remove(g,"navbar-shrink")}e=false}function c(){return window.pageYOffset||b.scrollTop}f()})();
var cbpAnimatedHeader=(function(){var b=document.documentElement,g=document.querySelector(".navbar-default"),e=false,a=220;function f(){d();window.addEventListener("scroll",function(h){if(!e){e=true;setTimeout(d,250)}},false)}function d(){var h=c();if(h>=a){classie.add(g,"navbar-shrink")}else{classie.remove(g,"navbar-shrink")}e=false}function c(){return window.pageYOffset||b.scrollTop}f()})();