Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zenoo/jquery-pagescroller

Scroll smoothly & easily
https://github.com/zenoo/jquery-pagescroller

jquery plugin scroll

Last synced: about 1 month ago
JSON representation

Scroll smoothly & easily

Awesome Lists containing this project

README

        

# pageScroller

Scroll smoothly & easily.

### Doc

* **Installation**

Simply import JQuery & pageScroller into your HTML.
```


```
* **How to use**
Select your sections container with a JQuery selector.
```
$('#container').pageScroller();
```
* **Options**
```
{
travelTime:1000, //travel time
afterTravelTimeout:1, //length of the pause after each scroll (> 0)
travelEasing:'swing', //easing type
startingPage:0, //Index of your starting page (in your container)
anchors:[], //list of CSS selectors for your custom anchors
onTrigger : function({nextPage,prevPage}) {}, //Triggers before the scroll starts
onEnd : function({nextPage,prevPage}) {} //Triggers after the scroll ends
}
```
* **Example**
```
$('#container').pageScroller({
travelTime:500,
afterTravelTimeout:50,
travelEasing:'swing',
startingPage:0,
anchors:['.test1','#test2','li.test3>a'],
onTrigger : function(e) {
console.log(e);
},
onEnd : function(e) {
console.log(e);
}
});
```

## Authors

* **Zenoo** - *Initial work* - [Zenoo.fr](http://zenoo.fr)