Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/pocesar/angular-equalizer

Equalize the height of a set of random elements, without necessarily having a common parent, container, etc.
https://github.com/pocesar/angular-equalizer

Last synced: 17 days ago
JSON representation

Equalize the height of a set of random elements, without necessarily having a common parent, container, etc.

Awesome Lists containing this project

README

        

Angular Equalizer
=================

Equalize the height of a set of random elements, without necessarily having a common parent, container, etc.

You can add and remove items on demand using the `EqualizerState` service.

### Usage

Add it to your dependencies

```js
angular.module('yourapp', ['ngEqualizer']);
```

Use it in your directive

```js
angular.module('yourapp').directive('yourDirective', ['EqualizerState', function(EqualizerState){
return {
link: function(scope, el, attr){
EqualizerState.add('yourDirective', el);
EqualizerState.add('yourDirective', angular.element('

'));
}
};
}]);
```

Or use it directly in your elements

```html




```

Elements must have an initial height and must not be hidden (their height is set to 0)

### Dependencies

Needs jQuery and Lodash. Also, uses `requestAnimationFrame`, use a polyfill if you must

### License

MIT