Created
August 28, 2019 16:21
-
-
Save djrmom/2f88fa1f7b60d68e08408e86f04521d7 to your computer and use it in GitHub Desktop.
facetwp updated isotope for avada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
if (FWP.loaded) { // trigger only after the initial refresh | |
$blogGrid = $( '.fusion-blog-layout-grid' ); // this to the class or id to apply isotope to | |
$blogGrid.isotope( { | |
// options - change these options to match the isotope options in use - https://isotope.metafizzy.co/options.html | |
itemSelector: 'article', | |
layoutMode: 'masonry' | |
}); | |
$blogGrid.imagesLoaded(function() { | |
$blogGrid.isotope('layout'); | |
}); | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment