pvsaintpe / yii2-float-thead
This is a Yii 2 wrapper for jquery.floatThead a floating/locked/sticky/fixed table header plugin that requires no special CSS and supports window and overflow scrolling.
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bluezed/yii2-float-thead: v1.0.9
This package is auto-updated.
Last update: 2024-10-25 08:35:27 UTC
README
This is a Yii 2 wrapper for jquery.floatThead a floating/locked/sticky/fixed table header plugin that requires no special CSS and supports window and overflow scrolling.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist pvsaintpe/yii2-float-thead "*"
or add
"pvsaintpe/yii2-float-thead": "*"
to the require section of your composer.json
file.
How to use
In your view file.
<table id="myTable"> <tr> <th>Col1</th> <th>Col2</th> </tr> <tr> <td>Data1</td> <td>Data2</td> </tr> </table> <?php \pvsaintpe\floatthead\FloatThead::widget( [ 'tableId' => 'myTable', 'options' => [ 'top'=>'50' ] ] ); ?>
If you only want to register the Assets without directly applying the plugin to a table you can use this command:
\pvsaintpe\floatthead\FloatThead::widget(['registerOnly'=>true]);