',
after: isLoaded
});
userFeed.run();
function isLoaded(){
var blogPosts = [];
$('.post_wrap').each(function(){
var post = {
itemText: '',
imageLink: '',
secondaryImages: []
};
post.itemText = $(this).find('.title').text();
if ($(this).find('.img_url').text().length > 0) {
console.log($(this).find('.img_url').text());
post.imageLink = $(this).find('.img_url img').eq(0).attr('src');
} else {
post.imageLink = "none";
}
post.secondaryImages = [$(this).find('.post_link').text()];
blogPosts.push(post);
console.log(blogPosts);
});
$('.portfolio_page').createPinterestGallery({
imagesPerRow: 4,
gridType: 'fit', /*grid-type: fit, crop, masonry*/
captionType: 'popup', /*options are 'popup' and 'static'*/
paginationPosition: 'scroll', /*options are 'scroll' (loads more images when scrolling to bottom of window), 'top', 'bottom' and 'both'*/
imageWidth: 288,
imageHeight: 288,
imagesPerPage: 12,
enablePopupInfo: true,
footerEl: $('footer'),
portfolioItems: blogPosts
});
$('p:empty').remove();
}
});
})(jQuery);