Horizontal scroll with inertia
npm install -S horizontal-scroll
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,
});
Node DOM
null
The list container.
Node DOM
null
Item in the list.
Boolean
false
If true, the list should have a skew relative to the scroll speed.
Number
0.1
Friction of the scroll.
Number
20
Strength of the skew effect.
Number
20
Limit value of the skew effect.
https://corentinfardeau.github.io/horizontal-scroll/
MIT.