Skip to content

Instantly share code, notes, and snippets.

@sonnyprince
Created October 29, 2014 09:37
Show Gist options
  • Save sonnyprince/2d9d769e9c997cd05fed to your computer and use it in GitHub Desktop.
Save sonnyprince/2d9d769e9c997cd05fed to your computer and use it in GitHub Desktop.
Reload masonry after images have loaded
jQuery( document ).ready( function( $ ) {
var container = $('.TheMasonryContainer').masonry();
// layout Masonry again after all images have loaded
container.imagesLoaded( function() {
container.masonry();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment