From 7a0624d615b4958c9022905145d210aabd3298c1 Mon Sep 17 00:00:00 2001 From: Ather Shu Date: Thu, 18 Apr 2019 12:44:04 +0800 Subject: [PATCH] use POS_LOAD instead of POS_END use POS_LOAD instead of POS_END, for infinite-scroll use document.height to calculate is near bottom, so wait for document loaded. --- InfiniteScrollPager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InfiniteScrollPager.php b/InfiniteScrollPager.php index e83bf2e..418c137 100644 --- a/InfiniteScrollPager.php +++ b/InfiniteScrollPager.php @@ -255,6 +255,6 @@ protected function initializeInfiniteScrollPlugin() $contentLoadedCallback = Json::encode($this->contentLoadedCallback); $this->view->registerJs("$('" . $this->pluginOptions['contentSelector'] . "').infinitescroll(" . $pluginOptions . ", " . $contentLoadedCallback . ");", - View::POS_END, $this->widgetId . '-infinite-scroll'); + View::POS_LOAD, $this->widgetId . '-infinite-scroll'); } }