Skip to content

Instantly share code, notes, and snippets.

@Ollo
Created January 23, 2013 22:45
Show Gist options
  • Save Ollo/4615246 to your computer and use it in GitHub Desktop.
Save Ollo/4615246 to your computer and use it in GitHub Desktop.
cycle 2 keyboard navigation
//gallery keyboard evetns
$(document.documentElement).keyup(function (event) {
if (event.keyCode == 37) {
$('.slider').cycle('prev');
} else if (event.keyCode == 39) {
$('.slider').cycle('next')
}
});
@konekoya
Copy link

This is exactly what i'm looking for! Thank you!
And I think you miss a semicolon after $('.slider').cycle('next')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment