Skip to content

Instantly share code, notes, and snippets.

@KnightAlex
Last active August 29, 2015 14:04
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 KnightAlex/9cfe0da49683fe577a27 to your computer and use it in GitHub Desktop.
Save KnightAlex/9cfe0da49683fe577a27 to your computer and use it in GitHub Desktop.
Woothemes Flexslider - responsive height fix
function fixHeight() {
var maxHeight = 0,
slides = el.find('.slides'),
data = el.data('flexslider');
slides.children()
.height('auto')
.each(function() {
maxHeight = Math.max(maxHeight, $(this).height());
})
.height(maxHeight);
slides.height(maxHeight);
data && (data.h = maxHeight);
}
win.load(fixHeight);
win.resize($.throttle ? $.throttle(250, fixHeight) : fixHeight);
fixHeight();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment