a light & tiny pull down refresh script with no dependancy.
<div class="pull-wrapper">
<div id="pullTop" class="pull-top">
<div id="arrowIcon" class="arrow"></div>
<div id="pullIcon" class="pointer none"></div>
<div id="succIcon" class="success none"></div>
<span id="pullText">刷新成功</span>
</div>
<div class="content-list">
list here
</div>
</div>
var pull = new pullDownRefresh({
container: '.pull-wrapper'
});
pull.on('before-pull', function () {
console.log('beforePull');
});
pull.on('refresh', function () {
console.log('refresh begin');
getData();
});
...
// callback success
pull.emit('success');
// callback fail
pull.emit('fail');
- copyright(c) 2018 oujizeng Licensed under MIT license.