I am using pjax
and masonry
in my tumblr theme. I just figured out how to get masonry to work after clicking a pjax'd link, but now the problem is that the like button is not working anymore. Here is my code so far:
html:
<article class="entry" id="{PostID}">
</article>
jquery:
$(document).ajaxComplete(function(){
$('#content').imagesLoaded(function(){
$('#content').masonry('reloadItems').masonry();
});
var $newPosts = $(data).find('.entry');
var $newPostIDs = $newPosts.map(function () {
return this.id;
}).get();
Tumblr.LikeButton.get_status_by_post_ids($newPostIDs);
});