2

I'm using Packery and Infinite Scroll plugins to load new items within masonry list.

I'm using this code on load document

$(window).load(function() {
    var $container = $("#container1");

    $container.packery({
        itemSelector: ".box1"
    });

    $container.infinitescroll({
        navSelector  : "#page-nav",
        nextSelector : "#page-nav a:first",
        itemSelector : ".box1",
        loading: {
            finished: function(){
                window.dispatchEvent(new Event("resize"));
            },
            finishedMsg: "No more pages to load.",
            img: "http://i.imgur.com/6RMhx.gif"
        }
    },
    function( newElements ) {
        $container.packery("appended",newElements);
    });
});

On Chrome my new items not showing correct, but the one up to other...

If i resize screen then my list fixes!

Any solution?

gpap13
  • 209
  • 1
  • 3
  • 13

0 Answers0