Improving MyjqReddit

In this chapter, we deliberately left out a few things in order to focus more on jQuery UI and less on API. You can take these as an exercise to improve the mashup we created in this chapter. Here are a few suggestions to take it to the next level:

  • We display only the first set of comments for a particular post. Use the API to load more comments by making new requests to the API using the value of after property.
  • Modify the code so that if the linked URL of any post is an image, that image should be displayed in a modal dialog if the URL is clicked.
  • Avoid opening duplicate tabs with the same subreddit name. For example, if the webdev subreddit is already open in a tab, disallow any fresh requests for it and switch to the corresponding ...

Get Mastering jQuery UI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.