Skip to content

Instantly share code, notes, and snippets.

@manishsongirkar
Created September 18, 2012 08:40
Show Gist options
  • Save manishsongirkar/3742068 to your computer and use it in GitHub Desktop.
Save manishsongirkar/3742068 to your computer and use it in GitHub Desktop.
Make Equal Height using jQuery
/* Function Declaration for Equal Height */
function rtp_equalHeight( group ) {
var tallest = 0;
group.each( function() {
var thisHeight = jQuery( this ).height();
if ( thisHeight > tallest ) {
tallest = thisHeight;
}
} );
group.height( tallest );
}
/* Usage */
rtp_equalHeight( jQuery( '.widget' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment