Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mauryaratan
Last active October 14, 2015 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauryaratan/4283646 to your computer and use it in GitHub Desktop.
Save mauryaratan/4283646 to your computer and use it in GitHub Desktop.
100% Column height using jQuery; conditional, applies only on one with less height.
var wrap = $('.content');
var col1 = $('.content .primary');
var col2 = $('.content .sidebar');
if (col1.height() < wrap.height()){
col1.css('height', wrap.height()+'px');
}
if (col2.height() < wrap.height()){
col2.css('height', wrap.height()+'px');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment