Created
July 5, 2013 08:37
-
-
Save Takaya213/5932980 to your computer and use it in GitHub Desktop.
Make elements have the same height.
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
$.fn.equalizeHeights = function() { | |
var maxHeight = this.map(function(i,e) { | |
return $(e).height(); | |
}).get(); | |
return this.height( Math.max.apply(this, maxHeight) ); | |
}; | |
$('.equal').equalizeHeights(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment