NormalParallax
Parallax library
Constructor Summary
| Public Constructor | ||
| public |
constructor(target: string | NodeList | Element | Element[], options: Object) |
|
Method Summary
| Public Methods | ||
| public |
destroy() Destroy instance |
|
| public |
run() Run animation |
|
| public |
update() Update cache and position |
|
Public Constructors
public constructor(target: string | NodeList | Element | Element[], options: Object) source
Params:
| Name | Type | Attribute | Description |
| target | string | NodeList | Element | Element[] | Target elements (selector or element object) |
|
| options | Object |
|
|
| options.onResize | onResize |
|
Resize event handler |
| options.onScroll | onScroll |
|
Scroll event handler |
| options.isRound | boolean |
|
Whether transform style value is rounded or not |
| options.autoRun | boolean |
|
Whether to run automatically |
| options.speed | number |
|
Moving speed (-Infinity to Infinity) |
| options.speedSp | number |
|
Moving speed in SP display (default is same as PC) |
| options.isSP | function |
|
Function to determine whether SP display or not |