Skip to content

Instantly share code, notes, and snippets.

@maxxcrawford
Created August 8, 2014 15:41
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 maxxcrawford/c25a6cbeba92de9b4d4e to your computer and use it in GitHub Desktop.
Save maxxcrawford/c25a6cbeba92de9b4d4e to your computer and use it in GitHub Desktop.
Set All Slides to Tallest Slide in Rotator
function updateSize() {
var rotatorHeight = $('.owl-carousel').height(),
slides = $('.owl-item');
slideSetHeight = slides.first().height();
slides.each(function(){
var slideHeight = $(this).height();
if (slideHeight > slideSetHeight){
slideSetHeight = slideHeight
}
});
slides.children().css('height', slideSetHeight + 'px');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment