<div class="contaniner">
<section class="list">
<ul class="wall" id="good-list">
</ul>
</section>
</div>

 

var outerScroller = document.querySelector('.list');
var touchStart = 0;
var touchDis = 0;
var clientHeight = document.documentElement.clientHeight;
outerScroller.addEventListener('touchstart', function(event) {
var touch = event.targetTouches[0];
touchStart = touch.pageY;
var h = outerScroller.offsetHeight;
if((clientHeight + touchStart) > h){
pulldownRefresh();
}
}, false);
outerScroller.addEventListener('touchmove', function(event) {
var touch = event.targetTouches[0];
touchStart = touch.pageY;
}, false);
outerScroller.addEventListener('touchend', function(event) {
touchStart = 0;
}, false);

posted on 2019-01-19 15:29  baraka  阅读(737)  评论(0编辑  收藏  举报