• 周一. 5月 27th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

前端下拉刷新实现

admin

11月 28, 2021

<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);

《前端下拉刷新实现》有4个想法
  1. Wow, incredible blog structure! How lengthy have you ever been blogging for?

    you make blogging look easy. The total glance of your site is great,
    as smartly as the content! You can see similar here e-commerce

  2. Hello! Do you know if they make any plugins to help with Search Engine
    Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing
    very good success. If you know of any please share.
    Cheers! You can read similar text here: Sklep

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注