PHP code example of badaboom / yii2-scroll-pager

1. Go to this page and download the library: Download badaboom/yii2-scroll-pager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

badaboom / yii2-scroll-pager example snippets


echo ListView::widget([
     'dataProvider' => $dataProvider,
     'itemOptions' => ['class' => 'item'],
     'itemView' => '_item_view',
     'pager' => ['class' => \badaboom\y2sp\ScrollPager::className()]
]);

echo GridView::widget([
     'dataProvider' => $dataProvider,
     'pager' => [
        'class' => \badaboom\y2sp\ScrollPager::className(),
        'container' => '.grid-view tbody',
        'item' => 'tr',
        'paginationSelector' => '.grid-view .pagination',
        'triggerTemplate' => '<tr class="ias-trigger"><td colspan="100%" style="text-align: center"><a style="cursor: pointer">{text}</a></td></tr>',
     ],
]);
 php composer.phar