In order to implement infinite scrolling, learn how to process the request to load more items and then how to add those items on the current page.
- View Offline
- Exercise Files
- [Instructor] In this movie,…we will learn how to process…the request to load in more items…and also how to pin those items…to a div on the current page.…In the previous movie,…we were able to fire off the Ajax request…and we got back a response.…And the response is exactly what we would want.…We got back HTML that contains our blog post.…Blog Post 101, 102 and 103.…Let's go and take a look at the code that was already there…that did that for us.…This code is code that I had already written,…so you have access to it.…Let me just fold this up for a moment…so we can look at the heart of this here.…
So we got a function here…for whether this is an Ajax request or not.…If it's not an Ajax request we're just going to exit.…I'm going to get the current page.…Remember that was sent along in the request?…It was a GET request and it was blog_posts.php?page=1.…So it gets to that value, which is 1.…It makes sure that it's an integer,…if not it also defaults to 1.…So that's going to be my variable page.…Then I'm going to call a function, find_blog_posts,…
- What is Ajax?
- Creating Ajax requests and responses
- Monitoring Ajax request state and events
- Responding to Ajax requests with HTML and JSON
- Building Ajax buttons
- Submitting forms with Ajax
- Implementing infinite scrolling
- Adding autosuggestions to text fields
Skill Level Intermediate
1. Ajax Defined
What is Ajax?5m 34s
2. Ajax Client
3. PHP Server
4. Ajax Button
5. Ajax Form Submission
6. Infinite Scrolling
7. Search Autosuggest
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.