$(function() {
// 1. a basic setup. navigate "over" the last element to see looping
$("div.horizontal:first").scrollable({loop:true});
// 2. vertical example. items are not clickable
$("div.vertical:eq(0)").scrollable({size:3, clickable:false, vertical:true});
// 3. another vertical example.
$("div.vertical:eq(1)").scrollable({size:3, vertical:true});
// setup global variable "api" to demonstrate scrollable API usage
window.api = $("div.vertical:eq(1)").scrollable();
// 4. two row example. just different layout in HTML
$("div.double").scrollable({
clickable:false,
// this time we have a custom listener
onSeek: function() {
$("#info").text("current index: " + this.getStatus().index);
}
});
});
var api = $("div.vertical:eq(1)").scrollable();