I have a simple question. I am fairly new to the entire API area and I am working with the Reddit API at the moment. What I want to do is basically load more than just one page of the subreddit I am pulling JSON from. I apologize in advance if this is a duplicate question.
This is what I have so far:
$.getJSON("http://www.reddit.com/r/pics/.json?jsonp=?", function(data) {
$.each(data.data.children, function(i,item){
$("<img/>").attr("src", item.data.url).appendTo("#images");
});
});
You can see a live JsFiddle here: Reddit JSON
My question is:
How can I load more content from other pages? [I believe it is only showing page #1] Can anyone here give me a link or a JsFiddle that shows how to do it?
Also, if anyone here is feeling generous, my aspiration is to fetch more information as the person keeps scrolling down.
Thank you.