Coda Clips

Unify Div Heights (using jQuery)

// Make the height of all the innerDivs the same height based on the tallest one.
  function unifyHeights() 
  {
    var maxHeight = 0;
    $('div#OuterContainer').children('div').each(function(){
      var height = $(this).outerHeight();
      //alert(height);
      if ( height > maxHeight ) { maxHeight = height; }
    });
    $('div.innerDivs').css('height', maxHeight);
  }

Added to by Michael D. Noga

Install Clip


Sponsored Links: