Skip to content

Instantly share code, notes, and snippets.

@LouisWhit
Last active December 18, 2015 15:39
Show Gist options
  • Select an option

  • Save LouisWhit/5805495 to your computer and use it in GitHub Desktop.

Select an option

Save LouisWhit/5805495 to your computer and use it in GitHub Desktop.
Set columns to same height on one row. All columns will be height of tallest column.
var i = 0;
var maxHeight = 0;
for (var li = $("#equalHeight .box").length; i < li; i++) {
var currentHeight = $("#equalHeight .box:eq("+i+")").height();
if (currentHeight > maxHeight) {
maxHeight = currentHeight;
};
};
$("#equalHeight .box").height(maxHeight);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment