Skip to content

Instantly share code, notes, and snippets.

@djrmom
Last active April 19, 2018 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrmom/6c98d774a915668807cc821ac2421fdf to your computer and use it in GitHub Desktop.
Save djrmom/6c98d774a915668807cc821ac2421fdf to your computer and use it in GitHub Desktop.
(function($) {
$(document).on('facetwp-loaded', function() {
if ( $().isotope ) {
var $container = $( '#tribe-events-photo-events' )
$container.isotope({
itemSelector: '.tribe-events-photo-event',
percentPosition: true,
masonry: {
columnWidth: '.tribe-events-photo-grid-sizer',
gutter: '.tribe-events-photo-gutter-sizer'
}
});
$container.imagesLoaded().progress( function() {
$container.isotope( 'layout' );
});
} else {
$( '#tribe-events-photo-events' ).removeClass( "photo-hidden" ).css( "opacity", "1" );
}
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment