• I’ve search everywhere and I still can’t seem to figure this out and get it working. I have a masonry layout with infinite scroll plugin that works fine sometimes. On first load the posts overlap but when I refresh it’s fine. I’m new to javascript and have no idea what to do to fix this. My #container is called #masonry and my item selector is .masonry-item.
    Here’s my code below.
    jQuery(document).ready(function($) {
    var $container = $(‘#masonry’);

    var msnry;

    $container.imagesLoaded(function(){
    $container.masonry({
    itemSelector: ‘.masonry-item’,
    columnWidth : 140
    });
    });
    });

    In the Infinite Scroll Setting Callback I have:

    _callback_masonry: function infscr_callback_masonry (newElements) {
    $(this).imagesLoaded( function(){
    $(this).masonry(‘appended’,$(newElements));
    });
    }

  • The topic ‘imagesLoaded, Masonry, and Infinite Scroll’ is closed to new replies.