darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

Sly

JavaScript library for one-directional scrolling with item based navigation support.

Sly supports navigation with:

... and has a powerful & developer friendly API!

That's all build around a custom highly optimized animation rendering with requestAnimationFrame, and GPU accelerated positioning with fallbacks for browsers that don't support it.

Dependencies

Compatibility

Works everywhere, even in IE6+ abominations, but that is a complete accident :) IE 6-7 are not officially supported.

Forum

Forum is for questions. Issues are for bug reports and feature requests. Don't mix the two :)

Usage

Constructor:

var options = {
    horizontal: 1,
    itemNav: 'basic',
    speed: 300,
    mouseDragging: 1,
    touchDragging: 1
};
var frame = new Sly('#frame', options).init();

jQuery proxy:

var options = {
    horizontal: 1,
    itemNav: 'basic',
    speed: 300,
    mouseDragging: 1,
    touchDragging: 1
};
$('#frame').sly(options);

jQuery proxy is good when you want to create an instance and forget about it. For anything more complex, like using methods, events, accessing instance properties, ... use the constructor and work with the instance directly.

Download

Latest stable release:

When isolating issues on jsfiddle, you can use this URL:

Documentation

Can be found in the docs directory.

Contributing

Please, read the Contributing Guidelines for this project.

License

MIT