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
Node DOM
null
container The list container.
Node DOM
null
blocks Item in the list.
Boolean
false
isAnimated If true, the list should have a skew relative to the scroll speed.
Number
0.1
spring Friction of the scroll.
Number
20
skewReducer Strength of the skew effect.
Number
20
skewLimit Limit value of the skew effect.
Example
https://corentinfardeau.github.io/horizontal-scroll/
License
MIT.