I want to get the value of $(document).scrollTop()
on my iOS device using touchmove
. Strangely, it works on Windows, MacOS, and Android, but it does not work on iOS.
$(document).bind({'touchmove': function(e){
console.log($(document).scrollTop()); a = true; console.log(a);
}});
$(document).scrollTop()
will continue to return the value 0.
window.requestAnimationFrame()
also fails.
Anyway, I want to update the console.log($(document).scrollTop())
value.