Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alxpereira/perfectsize
- Owner: alxpereira
- Created: 2015-02-11T17:56:08.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-11T18:10:21.000Z (almost 10 years ago)
- Last Synced: 2023-04-23T03:13:13.224Z (over 1 year ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 :
```htmlMy 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!**