Created
September 18, 2012 08:40
-
-
Save manishsongirkar/3742068 to your computer and use it in GitHub Desktop.
Make Equal Height using jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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