Skip to content

Instantly share code, notes, and snippets.

@michaelbourne
Created May 2, 2018 19:45
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 michaelbourne/91aff015b9a0d51f725f2ea66b672408 to your computer and use it in GitHub Desktop.
Save michaelbourne/91aff015b9a0d51f725f2ea66b672408 to your computer and use it in GitHub Desktop.
X Theme / Pro Theme Equalize Columns with each row being unique
(function($){
$(window).on('load resize', function() {
$(".equalize").each(function(index, el) {
var max = 0,
mobile = $(window).width();
$(this).find(".x-column").css('min-height', 'inherit');
$(this).find(".x-column").css('height', 'auto');
if ( mobile > 767 ){
$(this).find(".x-column").each(function(index, el) {
if( $(this).outerHeight() > max ){
max = $(this).outerHeight();
}
});
}
$(this).find(".x-column").css('min-height', max);
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment