Skip to content

Instantly share code, notes, and snippets.

@DannyNunez
Forked from drifterz28/Equal Height
Created January 4, 2013 21:05
Show Gist options
  • Select an option

  • Save DannyNunez/4456034 to your computer and use it in GitHub Desktop.

Select an option

Save DannyNunez/4456034 to your computer and use it in GitHub Desktop.
// set equal height with 2 tags
function set_height(div1, div2){
var height1 = $(div1).height();
var height2 = $(div2).height();
if(height1 > height2){
$(div2).css('min-height',height1);
}else{
$(div1).css('min-height',height2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment