문제

I'm using the following code to calculate how many pixels the user has scrolled offset from top:

$(document).scroll(function() {
    var scrollTop = $(window).scrollTop();
    console.log(scrollTop);
});

However, at some points on the site, it just 'pauses'. It says you don't scroll, although I am scrolling. I've tried numerous scripts, but the console keeps telling me the same thing.

This is the site

At this point that's all information I can give, since that's all I found. Hopefully someone can help me! Thanks!

Update - It only pauses around somewhere near 280px for me.

도움이 되었습니까?

해결책

Removing "overflow-x: hidden" from the body element seems to solve this issue.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top