Asynchronous loading technology enables asynchronous scrolling when the scroll bar reaches the bottom of the waterfall flow. Asynchronous loading technology achieves the Waterfall Stream effect from the scroll bar to the bottom. asynchronous scroll bar asynchronous loading technology achieves the Waterfall Stream effect. An event is triggered when the scroll bar reaches the bottom. This asynchronous loading technology achieves the asynchronous scroll bar when the scroll bar reaches the bottom of the waterfall flow effect.
Asynchronous loading technology achieves Waterfall Stream effect. Trigger an event when the scroll bar reaches the bottom. This event is written to $. the get () event transmits the Category id and page number to the internal program page. the program returns the product list of the relative pages under the category. if the program queries the current class without products, it returns null.
The scroll bar event must be written in window. onscroll to effectively judge the event. As follows:
Window. onscroll = function (){
// Var scrolltop=document.doc umentElement. scrollTop | document. body. scrollTop; var tops = $ (document ). scrollTop (); // obtain the position of the scroll bar var sctop = $ (document ). height ()-$ (window ). height (); var id = $ ("# ajax_claid "). val (); if (! Id) {id = 8 ;}$ ("# ajax_p "). val (tops); if (tops> = sctop) // if it is set up, the scroll bar is already at the bottom {var B = $ ("# ajax_p "). val (); if (B> a) {page = page + 1; // pass the page number} var Url = "aja_pro/" + id + "/" + page; // on the program page, query the returned data and directly return the information with html. $. Get (Url, function (data) {$ ("# aja_jia"). append (data );});}};
Jquery scroll event to automatically load the new aspnet project when the scroll bar reaches the bottom.
Here is a lazyload, that is, the delayed loading effect.
Drag the scroll bar to load the displayed data.
The tutorials and source code are provided.
Reference: www.blueidea.com/..20.20.41
How can I determine whether the scroll bar is scrolled to the bottom of the page using JS?
So that it can be compatible with IE and chrome.