基于jq 滚动条到底加载更多的方法
来源:互联网 发布:内部优惠券提取软件 编辑:程序博客网 时间:2024/06/06 05:24
方法如下,可自行添加加载动画
var page=1;var is_load=true;function getAllBrand_more(){//滚动条到底部加载更多page+=1;is_load=false;jsonAjax(API.API_LIST.SHOP_DETAIL,{'userid':userid,'page':page,},function(data){if(data.status==1){doTAppend(data,$('#ShopAll'));is_load=true;}});}$('body').on('touchmove',function(e){var windowHeight= document.documentElement.clientHeight;varscrollTop = $('body').scrollTop(); //滚动距离 varscrollHeight = $(document).height(); //文档总高度// console.log(scrollTop,windowHeight,scrollHeight);if(scrollTop + windowHeight >= scrollHeight-50){if(is_load){getAllBrand_more();}else{return;}}});
0 0
- 基于jq 滚动条到底加载更多的方法
- Duilib 中滚动条自动滚动到底的方法
- Duilib 中滚动条自动滚动到底的方法
- 滚动加载更多的代码
- 滚动条到底自动加载数据
- jq 滚动到底事件
- JQ带滚动效果的导航条
- JQ滚动条
- JQ滚动条事件
- JS滚动条到网页底部自动加载更多内容
- jquery.autocomplete 插件扩展滚动条加载更多
- vue 2 滚动条加载更多数据实现
- vue.js监听滚动条加载更多数据
- jq滚动加载
- 滚动加载更多内容
- 滚动加载更多
- js实现滚动条到底自动加载图片
- html滚动条到底不断加载数据代码
- [LeetCode] Decode Ways, Solution
- [FaceBook] Hanoi Moves, Solution
- git查看本地和创建分支、上传分支、提交代码到分支、删除分支等,git分支
- [Facebook] Products of all elements
- [Google] Inorder Successor in Binary Search Tree, Solution
- 基于jq 滚动条到底加载更多的方法
- [Google] URL query with wild card
- [Yahoo] Cloest palindrome number, Solution
- [LeetCode] Valid Palindrome, Solution
- [LeetCode] Word Ladder II, Solution
- [LeetCode] Sum Root to Leaf Numbers, Solution
- [LeetCode] Longest Consecutive Sequence, Solution
- [LeetCode] Surrounded Regions, Solution
- mysql 索引