mui Raja uploaded on the drop-down refresh simply applied

<link rel="stylesheet" href="../../public/assets/mui/css/mui.css">
<script src="../../public/assets/mui/js/mui.js"></script>

1、html

<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
      <div class="mui-scroll">
           <div class="mui-table-view mui-table-view-chevron unitconList"></div>
           <div class="mui-pull-bottom-pocket mui-block">
                <div class="mui-pull">
                     <div class="mui-pull-loading mui-icon mui-spinner mui-hidden"></div>
                     <div class="mui-pull-caption mui-pull-caption-down">上拉显示更多</div>
                </div>
           </div>
      </div>
      <div class="mui-scrollbar mui-scrollbar-vertical">
           <div class="mui-scrollbar-indicator"></div>
      </div>
</div>

 

2、js

  // initialize the variable 
  var COUNT = 0 ;
  var Page = 0;   // p 
    $ ( function () { 
            mui.init ({ 
                pullRefresh: { 
                    Container: '#pullrefresh' , 
                    Down: { 
                        the callback: pulldownRefresh 
                    }, 
                    up: { 
                        contentrefresh : 'loading ...' , 
                        the callback: pullupRefresh 
                    } 
                } 
            }); 
            // drop down loading
            function pulldownRefresh () { 
                $ ( ".conList") HTML ( "." ); 
                $ ( "pull-.mui-Caption-Down") ( "text." ); 
                the setTimeout ( function () { 
                    Page =. 1 ;   / / initialization page numbers
                    nextlist (Page); // initialize the data process 
                    MUI ( '#pullrefresh') pullRefresh () endPulldownToRefresh ();.. // Refresh Completed 
                }, 200 is ); 
            } 

            // the LAC containing concrete service implementation 
            function pullupRefresh () { 
                the setTimeout (function () { 
                    MUI ( '#pullrefresh') pullRefresh () endPullupToRefresh ((++ COUNT <0));.. // parameter is true, the data indicates no more. 
                    ++ Page ;   // page numbers accumulated
                     nextlist (Page);    // initialize method of data 
                }, 200 is ); 
            } 
            IF (mui.os.plus) { 
                mui.plusReady ( function () { 
                    the setTimeout ( function () { 
                        MUI ( '#pullrefresh' .) .pullRefresh () pullupLoading (); 
                    }, 200 is );

                });
            } else {
                mui.ready(function() {
                    mui('#pullrefresh').pullRefresh().pullupLoading();
                });
            }
        });

 mui official website   

http://dev.dcloud.net.cn/mui/

 

Guess you like

Origin www.cnblogs.com/dxt510/p/11201334.html