umerata
8/11/2017 - 10:23 AM

Match Heights | label-js

Match Heights


var matchHeights = [
  {
    selector:'div',
    maxHeight:0,
  }
];

$(matchHeights).each(function(index,item){
  $(item.selector).each(function(){
    if ($(this).height() > item.maxHeight) { item.maxHeight = $(this).height(); }
  });
  $(item.selector).height(item.maxHeight);
})