【文件属性】:
文件名称:手机滑动瀑布加载数据+Iscroll使用
文件大小:14KB
文件格式:ZIP
更新时间:2017-05-15 03:39:04
手机 瀑布加载 Mobile Iscroll 手机数据
myScroll = new iScroll('wrapper', {
scrollbarClass: 'myScrollbar', /* 重要样式 */
useTransition: false, /* 此属性不知用意,本人从true改为false */
topOffset: pullDownOffset,
onRefresh: function () {
if (pullDownEl.className.match('loading')) {
pullDownEl.className = '';
pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
} else if (pullUpEl.className.match('loading')) {
pullUpEl.className = '';
pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
}
},
onScrollMove: function () {
if (this.y > 5 && !pullDownEl.className.match('flip')) {
pullDownEl.className = 'flip';
pullDownEl.querySelector('.pullDownLabel').innerHTML = '松手开始更新...';
this.minScrollY = 0;
} else if (this.y < 5 && pullDownEl.className.match('flip')) {
pullDownEl.className = '';
pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
this.minScrollY = -pullDownOffset;
} else if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
pullUpEl.className = 'flip';
pullUpEl.querySelector('.pullUpLabel').innerHTML = '松手开始更新...';
this.maxScrollY = this.maxScrollY;
} else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
pullUpEl.className = '';
pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
this.maxScrollY = pullUpOffset;
}
},
【文件预览】:
手机iscroll应用实例
----index.html(9KB)
----scrollbar.css(2KB)
----pull-icon@2x.png(850B)
----scrollbar.png(199B)
----iscroll.js(33KB)
网友评论
- 谢谢,5分太多
- 学习中,谢谢分享
- 要上五分,太多了,之后又找到一个免费的,
- 很好用的,就是这个效果了,找了很久
- 挺好用 ,学习了 感谢分享
- 是我需要的效果;很好!赞赞
- 不错的,正好是我想要的,代码写的也非常容易理解,好评。
- 学习了,感谢分享
- 很好用,就需要这样的效果
- 可以,挺好用的
- 什么垃圾玩意
- 很好用值得学习,O(∩_∩)O谢谢
- 学习了,感谢分享
- 很好的资源,谢谢
- 挺好用的,谢谢.....