Skip to content

Instantly share code, notes, and snippets.

@enopanen
Created December 3, 2013 18:04
Show Gist options
  • Select an option

  • Save enopanen/7774280 to your computer and use it in GitHub Desktop.

Select an option

Save enopanen/7774280 to your computer and use it in GitHub Desktop.
This is a small jQuery snippet I ran into while surfing the web earlier in the year. While this is not the most recommended solution for your layout display, this code snippet may come in handy down the line. CSS column heights are not always matched and so this dynamic solution using JavaScript is worthy of some insight.
var maxheight = 0;
$("div.col").each(function(){
if($(this).height() > maxheight) { maxheight = $(this).height(); }
});
$("div.col").height(maxheight);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment