Line 706: | Line 706: | ||
var startY = $('nav > ul').height() * 2; //The point where the navbar changes in px | var startY = $('nav > ul').height() * 2; //The point where the navbar changes in px | ||
− | if($(window).scrollTop() > startY){ | + | if($(window).scrollTop() > window.innerHeight + startY){ |
$('nav > ul').addClass("scrolled"); | $('nav > ul').addClass("scrolled"); | ||
}else{ | }else{ |
Revision as of 10:50, 16 September 2016