Equalizer

Equalizer is a great way to create equal height content on your page.

Panel 1

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

Panel 2

  • Item 1
  • Item 2
  • Item 3

Panel 3

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

Basic

You can create an equal height container using a few data attributes. Apply the data-equalizer attribute to a parent container. Then apply the data-equalizer-watch attribute to each element you'd like to have an equal height. The height of data-equalizer-watch attribute will be equal to that of the tallest element.

NOTE: If items with equal height become stacked their heights will reset. This will ensure that unneccessary whitespace isn't introduced.

<div class="row" data-equalizer>
  <div class="large-6 columns panel white" data-equalizer-watch>
    ...
  </div>
  <div class="large-6 columns panel white" data-equalizer-watch>
    ...
  </div>

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

Advanced

Perhaps you need to create items that are positioned at the bottom of your input. For example Sign Up buttons on some pricing tables.

<div class="row" data-equalizer>
  <div class="large-6 columns">
    <ul class="pricing-table" data-equalizer-watch>
      ...
      <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
    </ul>
  </div>
  <div class="large-6 columns">
    <ul class="pricing-table" data-equalizer-watch>
      ...
      <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
    </ul>
  </div>
</div>
  • Standard
  • $99.99
  • 1 Database
  • 5GB Storage
  • 20 Users
  • Buy Now
  • Cadillac
  • $999.99
  • ∞ Databases
  • ∞ Storage
  • ∞ Users
  • SSL Support
  • 24/7 Support
  • Buy Now

Callbacks

There are two ways to bind to callbacks in your equalizers.

Callback Function
$(document).foundation({
  equalizer: {
    before_height_change: function() {
      // do something before the height changes
    },
    after_height_change: function() {
      // do something after the height changes
    }
  }
});
Events
$(document).on('before-height-change.fndtn.equalizer', function(){
  // do something before the height changes
});

$(document).on('after-height-change.fndtn.equalizer', function(){ // do something after the height changes });