当前位置:网站首页>Mui WebView down refresh pull-up load implementation
Mui WebView down refresh pull-up load implementation
2022-07-02 12:38:00 【Time chaser】
Some things will be discovered after experiencing , It turned out that I was so what before again , Because it's the first time to do , No clue , Sometimes I think if there is a demo Just fine , Then you won't spend so much useless work . Use today mui Of webview Implemented a H5 The effect of page pull-up loading pull-down refreshing , Take it out and share it with you , I hope you are useful , Of course, sometimes there are many pits , But as long as we learn to find problems by thinking , No matter what the problem is, we can solve it . My younger brother's literary talent is not good , Please point out any mistakes , Be open-minded to accept
// First of all, before that, we need to quote jquery Plug in for , as well as mui.js plug-in unit <!--html Code --> <!-- Containers to load --> <div class="shop-list font-16 col-1 mui-scroll-wrapper mui-content" id="refreshContainer"> <!--mui-scroll Whether sliding is allowed --> <div class="mui-scroll"> <!-- a key mui-table-view mui-table-view-chevron Here is the text style of the page loading --> <ul class="mui-table-view mui-table-view-chevron" id="list"> </ul> </div> </div> <!--MUIWEBvIEW Pagination --> <script type="text/javascript"> $(function () { // Number of items to be displayed var size = 3; // Page number var page = 1; // Pull down refresh listening event ( You can go straight here mui Copy... In the document ) mui.init({ pullRefresh: { container: '#refreshContainer', // The drop-down refresh down: { height: 50,// Optional , Default 50. Trigger pull down refresh drag distance , auto:false,// Optional , Default false. Automatic pull-up loading once callback: function () {// Mandatory , Refresh function , Write according to specific business , Such as through ajax Get new data from the server ; //5 Millisecond display window.setTimeout(function () { // Refresh down and reassign page = 1; size = 3; // Call the method to get the data DtGetData(size, page);
design sketch :
边栏推荐
- LeetCode—剑指 Offer 51. 数组中的逆序对
- arcgis js 4. Add pictures to x map
- Adding database driver to sqoop of cdh6
- Redis avalanche, penetration, breakdown
- High performance erasure code coding
- 1380. Lucky numbers in the matrix [two-dimensional array, matrix]
- 防抖 节流
- Discrimination of the interval of dichotomy question brushing record (Luogu question sheet)
- Why do programmers have the idea that code can run without moving? Is it poisonous? Or what?
- H5 to app
猜你喜欢
Simple understanding of ThreadLocal
Go learning notes - multithreading
通过反射执行任意类的任意方法
Adding database driver to sqoop of cdh6
drools中then部分的写法
Drools dynamically add, modify, and delete rules
[ybtoj advanced training guidance] judgment overflow [error]
深拷貝 事件總線
VLAN experiment
AI mid stage technology research
随机推荐
浏览器node事件循环
Bom Dom
线性DP AcWing 902. 最短编辑距离
BOM DOM
Calculate the maximum path sum of binary tree
Docker-compose配置Mysql,Redis,MongoDB
Leetcode - Sword finger offer 59 - I, 59 - II
bellman-ford AcWing 853. 有边数限制的最短路
Anti shake throttle
JDBC 预防sql注入问题与解决方法[PreparedStatement]
Openssh remote enumeration username vulnerability (cve-2018-15473)
通过反射执行任意类的任意方法
Mongodb redis differences
Dijkstra AcWing 850. Dijkstra求最短路 II
分布式机器学习框架与高维实时推荐系统
Enhance network security of kubernetes with cilium
BOM DOM
Intel internal instructions - AVX and avx2 learning notes
Sort---
The differences and relationships among port, targetport, nodeport and containerport in kubenetes