nerburish/yii2-equalize

Simple asset bundle for equalize.js (http://tsvensen.github.io/equalize.js/)

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2016-08-19 17:29 UTC

This package is not auto-updated.

Last update: 2024-10-04 18:27:08 UTC


README

Simple asset bundle for equalize.js jQuery plugin (http://tsvensen.github.io/equalize.js/) Equalize.js is a jquery plugin that allows make divs with equal height or width.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nerburish/yii2-equalize "dev-master"

or add

"nerburish/yii2-equalize": "dev-master"

to the require section of your composer.json file.

Usage

You can register the asset in your AppAsset

class AppAsset extends AssetBundle
{
    ...
    public $depends = [
        ...
        'nerburish\equalize\EqualizeAsset'
    ];
}

or use it directly in a view

<?php
\nerburish\equalize\EqualizeAsset::register($this);
?>

And then use as it is described in the documentation (http://tsvensen.github.io/equalize.js/):

<div id="height-example" class="example">
    <div>equalize</div>
    <div>equalize content height</div>
    <div>equalize</div>
    <div>equalize</div>
    <div>equalize</div>
    <div>equalize content</div>
    <div>equalize</div>
    <div>equalize</div>
    <div>equalize content height</div>
    <div>equalize</div>
  </div>
 
<?php $this->registerJs('$('#height-example').equalize(); // defaults to height') ?>