We can see such applications on some comment columns such as Tencent's website. The list does not use paging bars. Instead, a certain number of records are loaded at a time and displayed on the list page. When the user browses to the bottom of the list page, he or she can click "Load" More" to see more records. Some netizens reported that the loading speed is slow when the amount of data is large. This version changes the background reading method and speeds up the output speed.
Principle: When the page is loaded, jQuery requests data from the background. The ASP program displays the latest records on the list page by querying the database. There is a "more" link at the bottom of the list page. By triggering the link, the system sends data to the server. Send an Ajax request, the background ASP program receives the request parameters and responds, obtains the corresponding records from the database and returns them to the front-end page in the form of JSON. The front-end page jQuery parses the JSON data and appends the data to the list page.
jquery.more.js parameter configuration
'amount':'4',//The number of records displayed each time
'address':'',//Request the address of the background, leave it blank here
'format':'json',//Data transmission format
'template':'.single_item',//html records the class attribute of DIV
'trigger':'.get_more',//Trigger the class attribute to load more records
'scroll':'false',//Whether scrolling-triggered loading is supported
'offset':'100',//Offset when scrolling triggers loading