Posted by : Magnus Tuesday 19 June 2012

stroll.js - CSS3 scroll effects plugin
The style of scroll effect is determined via the class that is set on the list. Once the class is set, stroll.js needs to be told to monitor that list via the bind method:
1
2
3
4
5
6
7
8
// Bind via selectors
stroll.bind( '#main ul' );
// Bind via element reference
stroll.bind( document.getElementById( 'some-list' ) );
// Bind via array of elements / jQuery object
stroll.bind( $( '#main .some-list' ) );
You can provide an additional parameter with more options:
1
2
3
// Makes stroll.js monitor changes to the DOM (like adding or resizing items).
// This is taxing on performance so use scarcely. Defaults to false.
stroll.bind( '#main ul', { live: true } );
To disable the effect on an already bound list you can use the unbind method:
1
2
// Same target options as stroll.bind
stroll.unbind( selector/element/array );
Demo – Download

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Bjonk Design -