voskobovich / yii2-match-height-asset
A responsive equal heights jQuery plugin for Yii2
Package info
github.com/voskobovich/yii2-match-height-asset
Type:yii2-asset
pkg:composer/voskobovich/yii2-match-height-asset
v1.0.0
2016-01-31 14:43 UTC
Requires
- php: >=5.4.0
- bower-asset/matchheight: ~0.7.0
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2026-03-15 03:18:03 UTC
README
A responsive equal heights jQuery plugin for Yii2.
Support
Plugin
Demo.
Usage
Register the asset in the code view
<?php
...
voskobovich\matchheight\MatchHeightAsset::register($this);
?>
or in your AssetBundle
class AppAsset extends AssetBundle
{
...
public $depends = [
...
'voskobovich\matchheight\MatchHeightAsset'
];
}
and then execute JS code in view
<?php
<div class="block-name">
content
</div>
$this->registerJs('$(".block-name").matchHeight();')
?>
or
<div data-mh="group-name-1">
content
</div>
<div data-mh="group-name-2">
content
</div>
<?php $this->registerJs('$("body").matchHeight();') ?>
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist voskobovich/yii2-match-height-asset "~1.0"
or add
"voskobovich/yii2-match-height-asset": "~1.0"
to the require section of your composer.json file.