Skip to content

一个轻便无依赖的下拉刷新小组件,a light & tiny pull down refresh script with no dependancy

License

Notifications You must be signed in to change notification settings

yangyuji/native-pull-refresh

Repository files navigation

native-pull-refresh

a light & tiny pull down refresh script with no dependancy.

use like this:

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

preview

License

  • copyright(c) 2018 oujizeng Licensed under MIT license.

About

一个轻便无依赖的下拉刷新小组件,a light & tiny pull down refresh script with no dependancy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published