I am trying implement a “most recent” widget into my tumblr post. So far, I have been able to grab the top 5 most recent posts using json from this post (http://stackoverflow.com/questions/5617378/how-to-display-a-link-to-my-latest-tumblr-post-using-javascript). I want to know how to how to insert the {title} into the xxx so that the link shows the title of the recent posts.
I am thinking I need to use .append or .html, but I am not sure how to do it. Can someone help me out.
javscript:
$.getJSON('http://brianjsmith.tumblr.com/api/read/json?callback=?',
function(response) {
$('#myLink').attr('href',response.posts[0].title);
});
html:
<a id=#myLink>Most recent post {title}</a>
Update:
After check the response, there is no
titleproperty but theregular-title.