Skip to content

Instantly share code, notes, and snippets.

@coquer
Created February 6, 2015 10:00
Show Gist options
  • Select an option

  • Save coquer/92804d34f8118cf06efe to your computer and use it in GitHub Desktop.

Select an option

Save coquer/92804d34f8118cf06efe to your computer and use it in GitHub Desktop.
Resize DOM depending of biggest child Size
jQuery(_parent_class).each(function(i, obj) {
var xa = jQuery(obj).find(_find_class_name),
h = jQuery(xa).map(function(){
return jQuery(this).height();
});
var are = h.context.firstElementChild.clientHeight;
jQuery(_find_class_name).css('height', h.context.firstElementChild.clientHeight);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment