i am using Yii2 with a scroll pager extension: http://kop.github.io/yii2-scroll-pager/
However, when you set the scroll for a div, instead of the whole screen, ajax is not loading any additional items when you scroll down.
Here's my code:
echo ListView::widget([
'dataProvider' => $newsDataProvider,
'itemOptions' => ['class' => 'item'],
'itemView' => '_news_item_view',
'pager' => [
'class' => \kop\y2sp\ScrollPager::className(),
'negativeMargin' => '200',
'triggerText' => 'Load More news',
'triggerOffset' => 3,
'noneLeftText' => '',
],
'summary' => '',
]);
But this is not working. You can see it live mode here: http://188.226.170.133/
on the div with id = w0
here's css i've added to make the scroll happen only on this div:
#w0 {
height: 600px;
overflow-y: scroll;
}
Any suggestions?