var recentPosts = new google.feeds.Feed(“http://tellapart.tumblr.com/rss”);
recentPosts.setNumEntries(10); //Max entries: 200
recentPosts.load(formatoutput);//calls the function to download posts

function formatoutput(result){
if (!result.error){
var thefeeds=result.feed.entries;
populateFeed(thefeeds); 
}
else{//if error fetching feed, alert human readable error message
alert(result.error.message);
}
}

function populateFeed(thefeeds){
//populate the starting divs
var title = “”; //store the post title in ‘title’
var theUrl = “”;//store the URL in ‘theUrl’

for (var i=0; i<thefeeds.length; i++){
theUrl = thefeeds[i].link; //get the URL of the post
title = thefeeds[i].title; //get the title of the post

var divTag = document.createElement(“div”); //create a new div
divTag.className = “recentPostDiv”; //set the new div’s class
divTag.innerHTML = “<h4><a href=’” + theUrl + “’>” + title + “</a></h4>”; //construct the HTML
document.getElementById(‘recentPostsContainer’).appendChild(divTag); //add the info to your HTML
}
}