What's the difference between:
$(window).scrollTop()
and
$(document).scrollTop()
Thanks.
They are both going to have the same effect.
However, as pointed out in the comments: $(window).scrollTop()
is supported by more web browsers than $('html').scrollTop()
.