Last active
December 25, 2015 05:09
-
-
Save csknk/6923018 to your computer and use it in GitHub Desktop.
Sets a column height
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
| jQuery(document).ready(function($){ | |
| $(window).load(function(){ | |
| var outerHeightTotal = 0; | |
| $('.homeside_1').each(function(){ | |
| outerHeightTotal += $(this).outerHeight(); | |
| }); | |
| var totalH = outerHeightTotal ; | |
| $('.home_wrapper').css('min-height', totalH+'px'); | |
| $(window).resize(function() { | |
| var outerResizedHeightTotal = 0; | |
| $('.homeside_1').each(function(){ | |
| outerResizedHeightTotal += $(this).outerHeight(); | |
| }); | |
| var totalReH = outerResizedHeightTotal ; | |
| $('.home_wrapper').css('min-height', totalReH+'px'); | |
| }); | |
| }); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sets minimum height on the re-sized column, so that if too much content is added, the column height is able to grow and allow for this. Otherwise, the column height will match the height of a target column. This was done for visual reasons.