1.0.1 • Published 6 years ago

paralless v1.0.1

Weekly downloads
81
License
MIT
Repository
github
Last release
6 years ago

paralless

Hyper-minimal parallax implementation for subtle animation. 900b gzipped.

Usage

Specify attibutes and speeds for any elements you want parallaxed. Consider the speed value a fraction of 1 i.e. 0.5 moves at half the speed of scroll, or 0.1 moves at a tenth the speed of normal scroll.

<div data-paralless='0.5'></div>

Create an instance of paralless and call the returned function to bind all elements and begin parallaxing.

import paralless from 'paralless'

const parallax = paralless()

const destroy = parallax()

Call parallaxevery time the DOM changes, like page transitions and other mutations.

Any nodes no longer in the DOM will be removed from the listener cache.

Call destroy to stop all parallaxing.

License

MIT License (c) 2018 Friends of Friends

1.0.1

6 years ago

1.0.0

6 years ago

0.3.1

7 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago