Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.01 KB

readme.mdown

File metadata and controls

46 lines (27 loc) · 1.01 KB

jQuery Equals™ Plugin

A simple plugin to help maintain order amongst multiple elements that should really be the same size.

Usage:

Equalize the height only (default)

$('.element').equals();

Equalize the width only

$('.element').equals('width');

Equalize the height & width

$('.element').equals('both');

Center the content (beta)

$('.element').equals('both', true); // will equalize height and width and will center the content

Note: Only supports single elements within the equalized container for now, buggy in all but Gecko browsers.

For example, this will work:

<div class="element">
    <a href="#">
        <img src="sample-image.jpg" alt="Just proving my point." />
    </a>
</div>

This currently will not:

<div class="element">
    <h1>Headline</h1>
    <p>Text.</p>
</div>

Bonus

This plugin is chainable.

The following will work.

$('.element').hide().equals().delay(400).slideDown(800)