Created
February 17, 2010 13:47
-
-
Save ehynds/306617 to your computer and use it in GitHub Desktop.
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
// simple equal column heights | |
// sets the height of each matched div to that of the tallest element in the collection | |
// Usage: $("#div1, #div2, #div3").equalHeights(); | |
$.fn.equalHeights = function(){ | |
var heights = [], i = this.length; | |
while(i--){ heights[i] = this.eq(i).height(); } | |
return this.height(Math.max.apply(Math, heights)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment