Skip to content

Instantly share code, notes, and snippets.

@drifterz28
Created December 12, 2012 14:37
Show Gist options
  • Select an option

  • Save drifterz28/4268227 to your computer and use it in GitHub Desktop.

Select an option

Save drifterz28/4268227 to your computer and use it in GitHub Desktop.
Set equal height of 2 tags
// 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