Skip to content

Instantly share code, notes, and snippets.

@BHWD
Created August 8, 2016 15:44
Show Gist options
  • Save BHWD/11658eb7c97a567d06649e5bd0c3756f to your computer and use it in GitHub Desktop.
Save BHWD/11658eb7c97a567d06649e5bd0c3756f to your computer and use it in GitHub Desktop.
// set the empty variable
var maxHeight = 0;
// get the height of the tallest element of your selector e.g. tallest slide
$(yourelemselector).each(function(){
var thisH = $(this).height();
if (thisH > maxHeight) { maxHeight = thisH; }
});
// set all of the elements with your selector to this tallest elements height e.g. eqalising the height of slides
$(yourelemselector).height(maxHeight);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment