Created
May 2, 2018 19:45
-
-
Save michaelbourne/91aff015b9a0d51f725f2ea66b672408 to your computer and use it in GitHub Desktop.
X Theme / Pro Theme Equalize Columns with each row being unique
This file contains hidden or 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($){ | |
$(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