title: jquery - set height to every 2 or 3 elements
body: <p>I have several divs on a page in columns of 2, so every 2 divs needs to be the same height. As far as I can tell the plugins available for to force equal height do all elements the same height, I just need each pair to be the same height.</p>
  
  <p>my markup looks like this</p>
  
  
  
  
  
  <p>etc</p>
  
  <p>I have the following jquery which works, but I am sure it can be done easier</p>
  
  <pre><code>    {
      var rowOneHeight = Math.max($('div.large:eq(0)').height(),$('div.large:eq(1)').height());
      $('div.large:eq(0)').css('min-height', rowOneHeight);
      $('div.large:eq(1)').css('min-height', rowOneHeight);
  
      var rowTwoHeight = Math.max($('div.large:eq(2)').height(),$('div.large:eq(3)').height());
      $('div.large:eq(2)').css('min-height', rowTwoHeight);
      $('div.large:eq(3)').css('min-height', rowTwoHeight);
  
      var rowThreeHeight = Math.max($('div.large:eq(4)').height(),$('div.large:eq(5)').height());
      $('div.large:eq(4)').css('min-height', rowThreeHeight);
      $('div.large:eq(5)').css('min-height', rowThreeHeight);
  </code></pre>
  
  <p>}</p>
  
  <p>it would also need the same to be done with a group of three divs.
  Thanks</p>