K
K
Khurshed Abdujalil2017-05-19 14:05:40
Yii
Khurshed Abdujalil, 2017-05-19 14:05:40

How to load data on scroll Yii2 (kop/yii2-scroll-pager )?

echo \yii\widgets\ListView::widget([
                                'dataProvider' => $dataProvider,
                                'itemOptions' => ['class' => 'item'],
                                'itemView' => '_itemNew',
                                'summary' => false,
                                'pager' => ['class' => \kop\y2sp\ScrollPager::className(), 'eventOnScroll' => 'loadPager'],
                            ]);

did the same in loadPager
function loadPager() {
    $('.ias-trigger a').trigger('click');
}

when scrolling, each page is loaded twice, what's wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question