A simple plugin to help maintain order amongst multiple elements that should really be the same size.
$('.element').equals();
$('.element').equals('width');
$('.element').equals('both');
$('.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>
This plugin is chainable.
The following will work.
$('.element').hide().equals().delay(400).slideDown(800)