Skip to content

Appended items in single column #25

@thomEpps

Description

@thomEpps

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());
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions