Answer the question
In order to leave comments, you need to log in
Why doesn't $(window).scroll work for me in chrome?
Why in chrome console is undefined, but in other browsers - scrollbar data?
$(window).scroll(function(e) {
console.log(e.pageY);
});
Answer the question
In order to leave comments, you need to log in
If you are using jQuery, then I recommend using the function $(document).scrollTop()
and everything will work:
$(window).scroll(function(e) {
console.log($(document).scrollTop());
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question