Skip to content

Instantly share code, notes, and snippets.

@hidaytrahman
Created April 13, 2015 10:18
Show Gist options
  • Save hidaytrahman/ba357328c7c7c6afe3be to your computer and use it in GitHub Desktop.
Save hidaytrahman/ba357328c7c7c6afe3be to your computer and use it in GitHub Desktop.
Equal height for maximum height section for all div where applied this class, very useful for product base layout.
//Md Hidaytullah - Web Designer and UI Developer
$(document).ready(function(){
var biggesthei = 0;
$(".equal-height").each(function(){
if( $(this).height() > biggesthei )
{
biggesthei = $(this).height()
}
if($(window).width() < 600)
{
$(this).height() = biggesthei
}
$(".equal-height").css("min-height" , biggesthei);
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment