Parcel Height Fix

by Tika Datta Pahadi

JavaScript

$(document).ready(function(){
	ResizeCompRows();
})  
$(window).resize(function(){
	ResizeCompRows();
})
  
  
  
function ResizeCompRows(){
  var comps = $('.table-comps');
  var max = [];

  comps.each(function(){
      var rows = $(this).find('tr');
      for ( var i = 0; i < rows.length; i++){
      	rows.eq(i).height('auto');
        if( rows.eq(i).height() > (max[i] || 0)){
            max[i] = rows.eq(i).height();
        }
      }
  });

  comps.each(function(){
      var rows = $(this).find('tr');
      for ( var i = 0; i < rows.length; i++){
        rows.eq(i).height(max[i]);
      }
  });
  
}