Skip to content

Instantly share code, notes, and snippets.

S2.enableMultitouchSupport = true;
new S2.UI.Carousel("vcarousel", {drag: true, orientation: 'vertical'});
S2.enableMultitouchSupport = true;
new S2.UI.Carousel("hcarousel", {swipe: true});
S2.enableMultitouchSupport = true;
new S2.UI.Carousel("vcarousel", {swipe: true, orientation: 'vertical'});
S2.enableMultitouchSupport = true;
new S2.UI.Carousel("hcarousel", {flick: true});
S2.enableMultitouchSupport = true;
new S2.UI.Carousel("vcarousel", {flick: true, orientation: 'vertical'});
var hCarousel = new S2.UI.Carousel("hcarousel", {cycle: 'loop'});
new PeriodicalExecuter(function(pe) { hCarousel.scrollNext(); }, 3);
var vCarousel = new S2.UI.Carousel("vcarousel", {orientation: 'vertical', cycle: 'loop'});
new PeriodicalExecuter(function(pe) { vCarousel.scrollNext(); }, 3);
new Ajax.Request('http://github.com/api/v2/json/repos/show/madrobby/scripty2/contributors', {
method: 'get',
onSuccess: function(response) { console.log(response.responseJSON) }
});
var handler = $('content').on('click', function(event) {
console.log('ok');
handler.stop();
});
// can be used on windows#resize, after personal resizing, ...
$('hcarousel').fire('carousel:updateSize');