dev-master
9999999-devLink pager with infinite scroll support.
MIT
The Requires
by Yuri Plaksunov
extension yii2 pager scroll infinite endless autopagerize
Link pager with infinite scroll support.
LinkPager with infinite scroll support, (*1)
php composer.phar require --prefer-dist "darkcs/yii2-infinite-scroll" "*"
true
;.list-view
;.item
;.pagination
;.pagination .next a:first
;40
;null
;$pjax = \yii\widgets\Pjax::begin(); echo \yii\widgets\ListView::widget([ 'dataProvider' => $dataProvider, 'options' => [ 'class' => '.list-view', ], 'itemView' => '_item', 'summary' => false, 'layout' => '{items}{pager}', 'pager' => [ 'class' => \darkcs\infinitescroll\InfiniteScrollPager::className(), 'paginationSelector' => '.pagination-wrap', 'pjaxContainer' => $pjax->id, ], ]); \yii\widgets\Pjax::end();
// init $('.list-view').infinitescroll(); // enable, paused by default $('.list-view').infinitescroll('start'); // disable $('.list-view').infinitescroll('stop');
$('.list-view').on('infinitescroll:afterRetrieve', function(){ console.log('infinitescroll:afterRetrieve'); }); $('.list-view').on('infinitescroll:afterStart', function(){ console.log('infinitescroll:afterStart'); }); $('.list-view').on('infinitescroll:afterStop', function(){ console.log('infinitescroll:afterStop'); });
Link pager with infinite scroll support.
MIT
extension yii2 pager scroll infinite endless autopagerize