Equal Height Divs jQuery

Had posted a solution to this before but this one is far superior.

You can download at git hub here or get it from below.

The required jQuery.

Some html

<div class="blocks-container">
    <div class="blocks item-0">
          <h2>Lorem ipsum</h2>
           <p>Phasellus ut nibh fermentum, vulputate urna vel, semper diam.</p>
           <p>Aenean semper felis ipsum, vulputate consequat dui elementum vel.</p>
     </div>
     <div class="blocks item-1">
           <h3>Lorem ipsum dolor</h3>
           <p>Phasellus ut nibh fermentum, vulputate urna vel, semper diam. Nunc sollicitudin felis ut pellentesque fermentum. In erat mi, pulvinar sit amet tincidunt vitae, gravida id felis. Phasellus hendrerit erat sed porta imperdiet. Vivamus viverra ipsum tortor, et congue mauris porttitor ut.</p>
      </div>
      <div class="blocks item-2">
      		<h4>Lorem ipsum dolor sit amet.</h4>
      		<p>Aenean semper felis ipsum, vulputate consequat dui elementum vel. Nullam odio eros, sagittis vitae lectus id, pretium viverra lectus. Etiam auctor dolor non dui ultricies pulvinar.</p>
       </div>
</div>

And add the call to the script in your custom js or whatever…

 $('.blocks').matchHeight();

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 83 = 86