Registration and cancellation jquery-weui scrolling events

Registration
infinite (50) is a custom, not a detailed temporarily to understand, you can not write, which represents the default value.

// body is a whole block of code label, which is part of the scroll. 
$ ( 'body') Infinite () ON.. ( "Infinite", function () {
                    IF (loading)    return ; 
                    loading = to true ;
                     // use when paging 
                    Page ++ ;
                     // get the function data 
                    // do something 
                    
                }) ;    

 

Cancellation
on behalf of the drop-down list box when the end of secondary data fails, the next batch of data required to re-register the drop-down list need only use the box.

$(document.body).destroyInfinite();

 

Guess you like

Origin www.cnblogs.com/MrReed/p/11646128.html