Php + ajax + jquery click to load more content _ jquery

Source: Internet
Author: User
This article will explain in detail how to use jquery. more. js to load data under the page after clicking more. It is very practical. If you need it, you can refer to it. We can use this application on Some Weibo websites. The Weibo content list does not use pagination entries, but loads a certain number of records at a time and displays them on the list page, when you browse to the bottom of the list page, you can click "view more" to load more records. This article uses jQuery and PHP to show you how to implement this application.

Basic principle: When a page is loaded, jQuery requests data from the background. PHP queries the database to display the latest records on the list page, there is a "more" link at the bottom of the list page. By triggering this link, an Ajax request is sent to the server. the backend PHP program obtains the Request Parameters and makes the corresponding response, obtain the database records and return them to the front-end page in JSON format. jQuery parses JSON data on the front-end page and appends the data to the List page. It is actually the Ajax paging effect.

First, introduce the jquery library and jquery. more. js plug-in. jquery. more. js has encapsulated many functions and provided the parameter configuration function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.