Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alxpereira/perfectsize

perfectsize.js - Lightweight & Simple Divs Equalizer
https://github.com/alxpereira/perfectsize

Last synced: 1 day ago
JSON representation

perfectsize.js - Lightweight & Simple Divs Equalizer

Awesome Lists containing this project

README

        

# perfectsize.js - Lightweight & Simple HTML Equalizer

As said, it's a simple way to resize your HTML elements regarding the biggest one by block or by line !

### Version
1.0.0

### Tech

It's written in a pure and simple JS algorithm, no jQuery, no Angular, no Require, no bullshit...

### Installation

With npm
Sources are then in the node_modules folders.
```sh
$ cd YOURFOLDER
$ npm install perfectsize
```

Or directly via git
```sh
$ git clone https://github.com/alxpereira/perfectsize.git
```

### Use it !

perfectsize.js is easy to use

Call it in your head or wherever your want :
```html

My superb app

```

Init the plugin in your code :
```html

perfectsize.init();

```

The containers can be called by default **perfectgroup**
```html






```
Or you can select an identifier to target them
```javascript
// with a class
perfectsize.init({ selector : '.mycontainer' });
// with an id
perfectsize.init({ selector : '#mycontainer' });
// with an tagname
perfectsize.init({ selector : 'atagname' });
```

##### Grouping
By default perfectsize is doing an equalizer on the all group taking the highest children height to apply it on all the children.
```javascript
// nothing to do :)
```

But you can also tell him to do an equalizer by line ! (yeah)
```javascript
// with a class
perfectsize.init({ byline : true });
```

##### DOM ready
You can also force the plugin to waiting the document ready event to launch the equalizer :
```javascript
// with a class
perfectsize.init({ domready : true });
```

License
----

WTFPL (Do What the Fuck You Want to Public License) 2004
(Copyleft) 2015 - Alexandre Pereira

**Free Software, Hell Yeah!**