Skip to content

Instantly share code, notes, and snippets.

@katdowns
Created July 2, 2012 20:36
Show Gist options
  • Save katdowns/3035551 to your computer and use it in GitHub Desktop.
Save katdowns/3035551 to your computer and use it in GitHub Desktop.
Next/Back on Keypress
// left/right key press
$(document).keydown(function(e) {
if (e.which == 37) { // left key
$('#slideshow').cycle('prev');
} else if (e.which == 39) { // right key
$('#slideshow').cycle('next');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment