Line 703: | Line 703: | ||
<script> | <script> | ||
+ | var startY = $('nav > ul').height(); | ||
+ | |||
function checkScroll(){ | function checkScroll(){ | ||
− | if($(window).scrollTop() > window.innerHeight){ | + | if($(window).scrollTop() > window.innerHeight + startY){ |
$('nav > ul').addClass("scrolled"); | $('nav > ul').addClass("scrolled"); | ||
}else{ | }else{ |
Revision as of 10:51, 16 September 2016