Skip to content

jannisg/jquery-equals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

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)

About

A simple jQuery plugin that allows you to equalize the height, width or both of a given stack of elements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published