Can someone please share a extremely simple version of JQuery Ajax with pagination??
Can someone please share a extremely simple version of JQuery Ajax with pagination??
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would suggest using the server to take care of pagination, as in it should respond with the correct output based on the received
pageNoparameter:Note: When an object is passed as the second argument to
$.load, a POST request will be made. See http://api.jquery.com/load/EDIT: The same as above, but fetching JSON from the server:
EDIT(again): I would recommend using the server to render in the initial content. If you insist on requesting the first page of results with ajax, one way is to simulate the clicking of the link for page 1:
better you give your pagination links a class, say
.pageNo, to eliminate any confusion: