Created
December 3, 2013 18:04
-
-
Save enopanen/7774280 to your computer and use it in GitHub Desktop.
This is a small jQuery snippet I ran into while surfing the web earlier in the year. While this is not the most recommended solution for your layout display, this code snippet may come in handy down the line. CSS column heights are not always matched and so this dynamic solution using JavaScript is worthy of some insight.
This file contains hidden or 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
| var maxheight = 0; | |
| $("div.col").each(function(){ | |
| if($(this).height() > maxheight) { maxheight = $(this).height(); } | |
| }); | |
| $("div.col").height(maxheight); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment