怎么监听手机端屏幕的滑动啊,同时计算出滚动距离顶部多少?
$('body').bind('touchmove', function(e) {
var winHeight = $(window).scrollTop();
console.log(winHeight);
});
我这样写的一直是0? 监听scroll没效果的!求大神
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你试试这样写看看呗