Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Infinite Scroll + Masonry append help Re: Infinite Scroll + Masonry append help

#101959
Taufik Nurrohman
Participant

I guess the problem is on $(window).load()
Can you make a specific function that will make each time an item is loaded, the masonry function will be triggered again and again. I do not know how the infinite scroll function works, but this is roughly:

$('#posts').infiniteScroll({
...
}, function() { // Always trigger the masonry each time an item is appended
$('#posts').masonry({isAnimated:true});
});