erwstout
5/17/2016 - 9:26 PM

Equalize Elements on load and window resize

Equalize Elements on load and window resize

var equalize = function() {
  var max = Math.max.apply(null,
    $('.equalize').css('height', 'auto').map(function() {
        return $(this).outerHeight();
        })
      );
  $('.equalize').outerHeight(max);
};
  
  // equalize
  $(window).resize(function() {
    equalize();
  }).trigger('resize');