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

Share this page:

Newsletter

Subscribe to get regular news and updates

  • This field is for validation purposes and should be left unchanged.