Home › Forums › Pro Support › Preserve Masonry when using facets to search posts › Reply To: Preserve Masonry when using facets to search posts
March 22, 2019 at 2:18 pm
#8321
Participant
According to FacetWP help desk, masonry or other js scripts that need to reload can be done on the facetwp-loaded js hook
https://facetwp.com/documentation/developers/javascript/facetwp-loaded/
However, I have no Javascript skills. I’ve tried this, but it doesn’t work:
<script>
jQuery(document).on('facetwp-loaded', function() {
jQuery( '.masonry-container' ).masonry( 'layout' );
});
</script>
Any better ideas? Much thanks!