I am trying to get an inline like button for each post on the homepage of Tumblr's blogs, like the one similar to http://cicerontheme.tumblr.com/.
I have followed the suggestions on Tumblr — getting the 8 digit reblog code on home page (nearly there...), and included this on my code.
$('a.likeLink').click(function() {
var post = $(this).closest('.post');
var id = post.attr('id');
var oath = post.attr('rel').slice(-8);
var like = 'http://www.tumblr.com/like/'+oath+'?id='+id;
$('#likeit').attr('src', like);
});
I have used {PostID} and {ReblogURL}, both which are variable tags of Tumblr, for the values of the id and rel attributes, for the "post" class of a HTML tag, respectively. I have also included the likeit iframe for it to send a request to http://www.tumblr.com/like/....
Now, I am not sure which HTML tag those attributes belong to, so I have viewed the source of Ciceron, and have noticed that they are included in a div tag wrapping the post content and the a tags for the like and reblog buttons. I tried to follow, but it will not work.
I also tried putting those attributes in many different tags, but they still will not work. I am not even really sure if its failure to work is caused by the placement of the attributes anymore.
I will be so gladful if anyone who has gotten it to work would help me get it to work. Thank you.