Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save csknk/6923018 to your computer and use it in GitHub Desktop.

Select an option

Save csknk/6923018 to your computer and use it in GitHub Desktop.
Sets a column height
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');
});
});
});
@csknk
Copy link
Author

csknk commented Oct 10, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment