Made some 2 buttons on my blog so users can go the next or back trough posts. I think would be interesting to show the posts titles. It’s a blogspot blog so I’m trying to use a variable to catch the URL’s so I can use them with .load and target the post’s title:
$(function(){
var getlink = $("a.blog-pager-newer-link").attr("href");
var gettitle = $('.entry').load(getlink+ "#this-post-title"); //this part won't work!
$("<div id='next-title'>"+gettitle+"</div>").appendTo("a.blog-pager-newer-link");
});
You have a general logic issue.
What you actually want to do is load the contents of a url into the link.