Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created January 6, 2010 15:26
Show Gist options
  • Save walterdavis/270333 to your computer and use it in GitHub Desktop.
Save walterdavis/270333 to your computer and use it in GitHub Desktop.
Event.observe(window,'load',function(){
var select = (window.location.href.indexOf('?') > -1) ? window.location.href.split('?')[1] : '';
var my_glider = new Glider("carousel_item1", {duration:0.5, initialSection: select});
var my_glider2 = new Glider("carousel_item2", {duration:0.5, initialSection: select});
$$('.carousel_item1.next').each(function(elm){
elm.observe('click',function(evt){
Event.stop(evt);
my_glider2.next();
return my_glider.next();
});
});
$$('.carousel_item1.previous').each(function(elm){
elm.observe('click',function(evt){
Event.stop(evt);
my_glider2.previous();
return my_glider.previous();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment