Inflickity
Flick and swipe forever.
See demo nclud.github.com/inflickity
Custom widget created for nclud.com v3.
var myFlickity = new Inflickity( elem, { // options // you can overwrite these defaults as you like clones: 1, friction: 0.03, maxContactPoints: 3, offsetAngle: 0, onClick: undefined, animationDuration: 400, // basically jQuery swing easing: function( progress, n, firstNum, diff ) { return ( ( -Math.cos( progress * Math.PI ) / 2 ) + 0.5 ) * diff + firstNum; } });
Requires
- requestAnimationFrame polyfill
- Modernizr with the following options:
- CSS 2D Transforms
- CSS 3D Transforms
- Modernizr.prefixed()
Clone from GitHub
Don't forget to update/init submodules to get the requestAnimationFrame polyfill
git clone https://github.com/nclud/inflickity.git cd inflickity git submodule update --init