Works great on initial page load for creating a masonry blog layout, but when clicking 'load more' (ajax-ing the new posts on to the page) the majority of new items all load in a single column.
Initialise colcade:
$(".js-masonry").colcade({
columns: ".masonry-col",
items: ".masonry-item"
});
Appending new items:
$(document).ajaxComplete(function () {
function getItems() {
var items = $(".js-masonry-items > *");
return items;
}
$(".js-masonry").colcade("append", getItems());
});
Works great on initial page load for creating a masonry blog layout, but when clicking 'load more' (ajax-ing the new posts on to the page) the majority of new items all load in a single column.
Initialise colcade:
Appending new items: