How to monitor the sliding of the mobile phone screen and calculate the scrolling distance from the top?
$('body').bind('touchmove', function(e) {
var winHeight = $(window).scrollTop();
console.log(winHeight);
});
What I write like this is always 0? Monitoring scroll has no effect! Ask God
Try writing it like this