• Resolved throwingmarbles

    (@throwingmarbles)


    Hi,
    I’ve been trying to implement imagesLoaded in the Infinite Scroll script, but quite frankly don’t know where to to start and none of my attempts have brought me any closer to a solution.

    I’ve altered the Manual Trigger behaviour so that it’s suitable for Masonry/Isotope. My Isotope blocks contain images of various heights, so I need to first load those images before appending items, or else items end up overlapping.

    I’d greatly appreciate any pointers on how to combine Infinite Scroll with imagesLoaded.

    The imagesLoaded script:
    https://gist.github.com/desandro/797120

    Kindest regards,
    Marloes

    https://www.ads-software.com/extend/plugins/infinite-scroll/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter throwingmarbles

    (@throwingmarbles)

    This always happens, I mess around for days and nights without luck, finally pop the question online, try once more out of pure frustration and finally get it to work…

    I had to add the imagesLoaded call to Infinite Scroll as well as the Sampression theme scripts.js. In case anyone else searches, I edited this part in the behaviour script:

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

    Worked beautifully! And, for those wondering, with Infinite Scroll activated, the code above goes on the “Settings” page for the Infinite Scroll plugin in the “Callback” section.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Infinite Scroll and imagesLoaded’ is closed to new replies.