Created
May 14, 2020 10:23
-
-
Save kamlesh08/ac81b8ed7d3d976dcbb674aa1be66008 to your computer and use it in GitHub Desktop.
Inconsistent Layout while Filtering Products with FacetWP on WooPack Product Grid
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() { | |
$('.woopack-products').imagesLoaded(function() { | |
var highestBox = 0; | |
$('.woopack-products > .product').css('height', '').each(function(){ | |
if($(this).height() > highestBox) { | |
highestBox = $(this).height(); | |
} | |
}); | |
$('.woopack-products .product').height(highestBox); | |
}); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment