我收到错误:
cannot call methods on masonry prior to initialization; attempted to call 'appended'
我实施了建议的修复,但没有运气,我得到了同样的错误,我甚至回到了基础并做到了这一点:
imagesLoaded(this.galleryGrid, function(instance) {
var msnry = new Masonry('.grid', {
itemSelector: '.item',
columnWidth: '.item'
});
var $newElems = $('.test').clone();
$('.grid').masonry('appended', $newElems );
});
我仍然得到同样的错误。任何解决方案?