https://github.com/derekisbusy/yii2-waypoints
Waypoints assets for Yii2 projects
https://github.com/derekisbusy/yii2-waypoints
Last synced: 2 months ago
JSON representation
Waypoints assets for Yii2 projects
- Host: GitHub
- URL: https://github.com/derekisbusy/yii2-waypoints
- Owner: derekisbusy
- Created: 2019-06-23T20:06:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-23T21:29:48.000Z (almost 6 years ago)
- Last Synced: 2025-01-20T09:46:21.226Z (4 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii2 Waypoints
==============
Waypoints assets for Yii2 projectsInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer require --prefer-dist derekisbusy/yii2-waypoints:dev-master
```or add
```
"derekisbusy/yii2-waypoints": "dev-master"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it by adding it to your view :
```php
use \derekisbusy\waypoints\WaypointsAsset;WaypointsAsset::register($this);
```or by adding it to another assets dependencies list :
```php
public $depends = [
'derekisbusy\waypoints\WaypointsAsset'
];
```Then use waypoints in your view :
```html
var waypoint = new Waypoint({
element: document.getElementById('waypoint'),
handler: function(direction) {
console.log('Scrolled to waypoint!')
}
})```
Documentation
-------------* [Waypoints](http://imakewebthings.com/waypoints/guides/getting-started/)
* [Yii2 assets](https://www.yiiframework.com/doc/guide/2.0/en/structure-assets)