Web page scrolling mode
Scroll to the bottom automatically pull data //page roll to bottom asynchronously load next page of data $ (window). Scroll () { //has scrolled to the top of the page height var scrolltop = Parsefloat ($ (this). ScrollTop ()), //page height scrollheight = $ (document). Height (), //browser window altitude WindowHeight = parsefloat (this). Height ()), totalheight = scrolltop + windowheight; Here is the event triggered by the scroll bar to the bottom, where the data to be loaded is written, or if the scroll bar is pulled (scrolltop + windowheight >= scrollHeight-0.7) { var index = $ ('. Swiper-slide-active '). Data ("index"); var id = $ ('. Swiper-slide-active '). attr ("id"); Eval (' +id+ ' (' +number ' (index) +1+ ', ' +pagenumber+ ', ' ' +userid+ ' ") '); } );
Scrollable elements, scrolling to the bottom, triggering acquisition of data
Scroll to the bottom automatically pull data //page roll to bottom asynchronously load next page of data $ (". Swiper-slide"). Scroll (function () { //has scrolled to the top of the page height var ScrollTop = parsefloat ($ (this). ScrollTop ()), //scroll height scrollheight = this.scrollheight, //window height WindowHeight = $ (this). Height (), totalheight = scrolltop + windowheight; Here is the event triggered by the scroll bar to the bottom, where the data to be loaded is written, or if the scroll bar is pulled (scrolltop + windowheight >= scrollHeight-0.7) { Console.log ("= = ="); var nextindex = number ($ ('. Swiper-slide-active '). Data ("index")) +1; var id = $ ('. Swiper-slide-active '). attr ("id"); Eval (' + ID + ' (' + Nextindex + ', ' + pagenumber + ', ' + userid + ' ") ');} );
Scroll to the bottom of the page, pull the data