我对加载无限滚动的砌体图像有问题,第一次加载时一切正常,但在无限滚动砌体计算错误位置后
$(function(){
var $grid = $('.promos-get').masonry({
itemSelector: 'none',
columnWidth: '.grid-sizer',
percentPosition: true,
stagger: 30,
visibleStyle: { transform: 'translateY(0)', opacity: 1 },
hiddenStyle: { transform: 'translateY(100px)', opacity: 0 }
});
var msnry = $grid.data('masonry');
$grid.imagesLoaded( function() {
$grid.masonry( 'option', { itemSelector: '.grid-item' });
var $items = $grid.find('.grid-item');
$grid.masonry( 'appended', $items );
});
$grid.infiniteScroll({
path: '.pagination .next-page a',
append: '.grid-item',
outlayer: msnry,
history: false
});
})