So I seem to get this error for some reason: [InfiniteScroll] imagesLoaded required for outlayer option
Even though I have declared imagesLoaded...here is my code:
$('.item-list').imagesLoaded(function () {
var $grid = $('.item-list');
$grid.isotope({
itemSelector: '.item-list__card',
percentPosition: true,
masonry: {
columnWidth: '.grid-sizer'
}
});
var iso = $grid.data('isotope');
$grid.infiniteScroll({
path: '.navigation a',
append: '.item-list__card',
debug: true,
status: '.infinite-scroll-request',
outlayer: iso
}
);
});
I load my plugins with webpack and es6 at the top of the page:
import 'ImagesLoaded';
import Isotope from 'Isotope';
import InfiniteScroll from 'infinite-scroll';
No idea what's going on unfortunately, hope someone can help!
Ok looks like I didn't read all the docs for the Webpack installation... I had to assign infinite scroll to imagesloaded.
So my complete code is: