Created
November 15, 2013 19:07
-
-
Save gormus/7489838 to your computer and use it in GitHub Desktop.
Based on the discussion found at foundation issue #1358 https://github.com/zurb/foundation/issues/1358#issuecomment-28546603
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
$(window).load(function() { | |
$("[data-match-height]").each(function() { | |
var parentRow = $(this), | |
childrenCols = $("> [data-height-watch]", this), | |
childHeights = childrenCols.map(function(){ return $(this).outerHeight(); }).get(), | |
tallestChild = Math.max.apply(Math, childHeights); | |
childrenCols.css('min-height', tallestChild); | |
}); | |
}); |
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
[data-height-watch] { | |
border-left: 1px solid gray; | |
} | |
[data-match-height] > [data-height-watch][data-height-watch-novrule] { | |
border-left: 0 none; | |
} | |
@media only screen and (max-width:1023px) { | |
[data-height-watch] { | |
min-height: 1px !important; | |
border-left: 0 none !important; | |
} | |
} |
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
<div class="row" data-match-height> | |
<div class="medium-12 large-9 large-push-3 columns" data-height-watch> | |
Main column on the right | |
</div> | |
<div class="large-3 large-pull-9 columns" data-height-watch data-height-watch-novrule> | |
Sidebar column on the left | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment