In this assignment, you will create a search and results page using Ajax and the Reddit API. The Reddit API endpoint you’ll be working with looks like this:
The Search Form
At the top of the page, create a form with a single search input and a submit button. When the user submits the form, fire off an Ajax request (using jQuery,
XMLHttpRequest) to get all the threads for the subreddit that was typed into the search box.
Note: Bind to the submit event on the form element instead of binding to the click event on the button.
Rendering the Results
When the Ajax request responds successfully, render the
author of each post. Each post can be found in
A Loading Spinner
While the Ajax request is pending, show some sort of loading indicator on the screen. This could be as simple as “Loading…” or one of these cool CSS spinners.
Create a repo on Github called itp404-assignment1 and upload your files. Send an email to the TA and myself with the Github URL.