Equal Height – jQuery

(function($) {
	"use strict";
  
  function equalHeight(){
    // EQUAL HEIGHT on large screen size
    $('.equal-height-container-large').each(function(){  
      if($(window).width() > 960) { 
        var highestBox = 0;
        $('.equal-height-item', this).each(function(){
          if($(this).height() > highestBox) {
            highestBox = $(this).height(); 
          }
        });  
        $('.equal-height-item',this).height(highestBox);
      }  else {
        $('.equal-height-item', this).each(function(){
          $(this).css('height', '');
          console.log('window small');
        });
      }     
    });
  } 
  $(document).ready(equalHeight);
  $(window).resize(equalHeight);

})(jQuery);

Search the site


Address

123 Main Street
Town
City
P05T C0D3

Tel: 01234 567 899

Mob: 01234 567 899

Email: ben@gomopress.com


Copyright 2023. Blah blah blah Company Limited