djrmom

{{gist file=”facet.js” lang=”javascript”}}
(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);
{{/gist}}