Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robertcedwards/0c98521ecc52f0f4ccbe0cde8c8b520f to your computer and use it in GitHub Desktop.
Save robertcedwards/0c98521ecc52f0f4ccbe0cde8c8b520f to your computer and use it in GitHub Desktop.
Correct order for load and layout
jQuery(document).ready(function($){
$('section.loading').fadeOut('fast');
$('section.gallery').imagesLoaded(function() {
$('.gallery').packery({
itemSelector: 'div',
gutter: 10
});
$('section.gallery').addClass('loaded');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment