4a4b891b68c90b35810e20462c6a0f0e.png

ff20617b0252a94a2598425ec9f64fdc.png

插件描述:依赖于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(); --- ****/

}

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐