Skip to content
Horizontal scroll with inertia
JavaScript
Branch: master
Clone or download
Corentin Fardeau
Corentin Fardeau Minify version
Latest commit 022aa8b Sep 27, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Minify version Sep 27, 2017
examples Update Readme Sep 27, 2017
src Update Readme Sep 27, 2017
.editorconfig init Jan 27, 2017
.eslintrc init Jan 27, 2017
.gitignore init Jan 27, 2017
LICENSE init Jan 27, 2017
README.md Update Readme Sep 27, 2017
package.json error in the package.json Feb 22, 2017

README.md

horizontal-scroll

Installation

npm install -S horizontal-scroll

Usage & API

HTML

<div class="container">
	<div class="block"></div>
	<div class="block"></div>
	<div class="block"></div>
	<div class="block"></div>
	<div class="block"></div>
</div>

Javascript

var blocks = document.getElementsByClassName('block');
var container = document.getElementsByClassName('container');
var hs = new HorizontalScroll.default({
	blocks : blocks,
	container: container,
});

Options

container Node DOM null

The list container.

blocks Node DOM null

Item in the list.

isAnimated Boolean false

If true, the list should have a skew relative to the scroll speed.

spring Number 0.1

Friction of the scroll.

skewReducer Number 20

Strength of the skew effect.

skewLimit Number 20

Limit value of the skew effect.

Example

https://corentinfardeau.github.io/horizontal-scroll/

License

MIT.

You can’t perform that action at this time.