插件描述:依赖于iscroll,模拟app的Listview的下拉更新上拉加载效果,查看效果最好用chrome调出模拟器查看。
1.首先引用必须的文件
2.加入需要的html,结构如下
- row 10
- row 9
- row 8
- row 7
- row 6
- row 5
- row 4
- row 3
- row 2
- row 1
3.初始化插件refresher.init({
id:"wrapper",
pullDownAction:Refresh,
pullUpAction:Load
});
function Refresh() {
//
wrapper.refresh();/****remember to refresh after action completed! --example-yourId.refresh(); ----| ****/
}
function Load() {
//
wrapper.refresh();/****remember to refresh after action completed!!! -example--yourId.refresh(); --- ****/
}