I am trying to use some ajax and the jQuery Masonry plugin to add some items - but for some reason the new items aren\'t getting the masonry applied ?
I\'m using
I added the following code after the append command and everything was fine:
$grid.imagesLoaded().progress( function() {
$grid.masonry('layout');
});
The reason:
Unloaded images can throw off Masonry layouts and cause item elements to overlap. imagesLoaded resolves this issue. imagesLoaded is a separate script you can download at imagesloaded.desandro.com.
source