PHPackages                             panix/wgt-scroll-pager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. panix/wgt-scroll-pager

ActivePixelion-component

panix/wgt-scroll-pager
======================

Infinite AJAX scrolling

2.0.1(2y ago)02331MITJavaScriptPHP &gt;=5.4.0

Since Nov 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/andrtechno/wgt-scroll-pager)[ Packagist](https://packagist.org/packages/panix/wgt-scroll-pager)[ Docs](https://github.com/andrtechno/wgt-scroll-pager/)[ RSS](/packages/panix-wgt-scroll-pager/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (4)Used By (1)

Scroll Pager
============

[](#scroll-pager)

infinite scrolling page using AJAX.

Y2SP works with a `yii\data\Pagination` object which specifies the totally number of pages and the current page number.

Pager is build with help of [jQuery Infinite Ajax Scroll plugin](http://infiniteajaxscroll.com/).

[![Latest Stable Version](https://camo.githubusercontent.com/ab55e170e2096a516eb208526f45eecd35b7984bb51610e7f37ee0261b925fd9/68747470733a2f2f706f7365722e707567782e6f72672f70616e69782f7767742d7363726f6c6c2d70616765722f762f737461626c65)](https://packagist.org/packages/panix/wgt-scroll-pager)[![Total Downloads](https://camo.githubusercontent.com/64338ed66957899cd8c2e275069aaa10059ec49d416573f116eb45e1bbf132f9/68747470733a2f2f706f7365722e707567782e6f72672f70616e69782f7767742d7363726f6c6c2d70616765722f646f776e6c6f616473)](https://packagist.org/packages/panix/wgt-scroll-pager)[![Monthly Downloads](https://camo.githubusercontent.com/049674abce8649213460a0f1d5b42860c65f925aadc10b8b9e83ce7d2c811ea4/68747470733a2f2f706f7365722e707567782e6f72672f70616e69782f7767742d7363726f6c6c2d70616765722f642f6d6f6e74686c79)](https://packagist.org/packages/panix/wgt-scroll-pager)[![Daily Downloads](https://camo.githubusercontent.com/cb9b3fa358f2a7586ffd532b990b059caa466d41f9553a8a75ae96cef3919fac/68747470733a2f2f706f7365722e707567782e6f72672f70616e69782f7767742d7363726f6c6c2d70616765722f642f6461696c79)](https://packagist.org/packages/panix/wgt-scroll-pager)[![Latest Unstable Version](https://camo.githubusercontent.com/0f447798118fd54464fb04493432f773bb27d85ffe23cec9612dbbc1286328fb/68747470733a2f2f706f7365722e707567782e6f72672f70616e69782f7767742d7363726f6c6c2d70616765722f762f756e737461626c65)](https://packagist.org/packages/panix/wgt-scroll-pager)[![License](https://camo.githubusercontent.com/f75ccdf5e958bb8b1fd562722ec4b89f1711742f0b214c0e3758703d7de1f839/68747470733a2f2f706f7365722e707567782e6f72672f70616e69782f7767742d7363726f6c6c2d70616765722f6c6963656e7365)](https://packagist.org/packages/panix/wgt-scroll-pager)

Requirements
------------

[](#requirements)

- Yii 2.0
- PHP 5.4

Installation
------------

[](#installation)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

Either run

`php composer require panix/wgt-scroll-pager "dev-master"`

or add

` "panix/wgt-scroll-pager": "dev-master"`

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

Just pass the ScrollPager class name to the ListView `pager` configuration. Make sure that items in your list have some classes that can be used as JavaScript selectors.

### ListView

[](#listview)

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

### GridView

[](#gridview)

```
echo GridView::widget([
     'dataProvider' => $dataProvider,
     'pager' => [
        'class' => \panix\wgt\scrollpager\ScrollPager::class,
        'container' => '.grid-view tbody',
        'item' => 'tr',
        'paginationSelector' => '.grid-view .pagination',
        'triggerTemplate' => '{text}',
     ],
]);
```

Configuration
-------------

[](#configuration)

### General Options

[](#general-options)

Option nameDescriptionDefault valuecontainerThe selector of the element containing your items that you want to paginate.`.list-view`itemThe selector of the element that each item has.&lt;br Make sure the elements are inside the container element.`.item`paginationSelectorThe selector of the element containing the pagination.`.list-view .pagination`nextThe selector of the link element that links to the next page.
 The href attribute of this element will be used to get the items from the next page.
 Make sure there is only one(1) element that matches the selector.`.next a`delayMinimal number of milliseconds to stay in a loading state.`600`negativeMarginBy default IAS starts loading new items when you scroll to the latest `.item` element.
 The `negativeMargin` will be added to the items offset, giving you the ability to load new items earlier (please note that the margin is always transformed to a negative integer).

 *Example:* Setting a negativeMargin of 250 means that IAS will start loading 250 pixel before the last item has scrolled into view.`10`### Extensions

[](#extensions)

Option nameDescriptionDefault valueenabledExtensionsThe list of the enabled plugin extensions.\[
 `ScrollPager::EXTENSION_TRIGGER`,
 `ScrollPager::EXTENSION_SPINNER`,
 `ScrollPager::EXTENSION_NONE_LEFT`,
 `ScrollPager::EXTENSION_PAGING`,
 `ScrollPager::EXTENSION_HISTORY`
\]### Extension Options

[](#extension-options)

Option nameDescriptionDefault valuetriggerTextText of trigger the link.`Load more items`triggerTemplateAllows you to override the trigger html template.`{text}`triggerOffsetThe number of pages which should load automatically. After that the trigger is shown for every subsequent page.

 *Example:* if you set the offset to 2, the pages 2 and 3 (page 1 is always shown) would load automatically and for every subsequent page the user has to press the trigger to load it.`0`spinnerSrcThe src attribute of the spinner image.[![Spinner Image](https://raw.githubusercontent.com/andrtechno/wgt-scroll-pager/v1.0.2/assets/infinite-ajax-scroll/images/loader.gif)](https://raw.githubusercontent.com/andrtechno/wgt-scroll-pager/v1.0.2/assets/infinite-ajax-scroll/images/loader.gif)spinnerTemplateAllows you to override the spinner html template.``noneLeftTextText of the "nothing left" message.`You reached the end`noneLeftTemplateAllows you to override the "nothing left" message html template.`{text}`historyPrevThe selector of the link element that links to the previous page.
 The href attribute of this element will be used to get the items from the previous page.
 Make sure there is only one element that matches the selector.`.prev a`overflowContainerA selector for `div` HTML element to use as an overflow container.`null`### Plugin Events

[](#plugin-events)

Option nameDescriptionDefault valueeventOnScrollTriggered when the visitors scrolls.`null`eventOnLoadTriggered when a new url will be loaded from the server.`null`eventOnLoadedTriggered after a new page was loaded from the server.`null`eventOnRenderTriggered before new items will be rendered.`null`eventOnRenderedTriggered after new items have rendered.`null`eventOnNoneLeftTriggered when there are no more pages left.`null`eventOnNextTriggered when the next page should be loaded.
 Happens before loading of the next page starts. With this event it is possible to cancel the loading of the next page.
 You can do this by returning false from your callback.`null`eventOnReadyTriggered when IAS and all the extensions have been initialized.`null`eventOnPageChangeTriggered when a used scroll to another page.`null`Report
------

[](#report)

- Report any issues [on the GitHub](https://github.com/andrtechno/wgt-scroll-pager/issues).

License
-------

[](#license)

**wgt-scroll-pager** is released under the MIT License. See the bundled `LICENSE.md` for details.

Resources
---------

[](#resources)

- [Packagist Package](https://packagist.org/packages/panix/wgt-scroll-pager)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1067d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f081670109ead0bd6a80aa3af5e9ef9fdcacecdaa3d5a9c1281eed523d09e455?d=identicon)[andrtechno](/maintainers/andrtechno)

---

Top Contributors

[![andrtechno](https://avatars.githubusercontent.com/u/6948026?v=4)](https://github.com/andrtechno "andrtechno (27 commits)")

### Embed Badge

![Health badge](/badges/panix-wgt-scroll-pager/health.svg)

```
[![Health](https://phpackages.com/badges/panix-wgt-scroll-pager/health.svg)](https://phpackages.com/packages/panix-wgt-scroll-pager)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
