How can I show the next previous pages when I press the left or right arrow?
http://jsfiddle.net/9Ntrz/
$(document.documentElement).keyup(function (e) { if (e.keyCode == 39) { ??? } if (e.keyCode == 37) { ??? } });
Just use a loop ('command'):
$(document.documentElement).keyup(function (e) { if (e.keyCode == 39) { $('#slideshow').cycle('next'); } if (e.keyCode == 37) { $('#slideshow').cycle('prev'); } });
More details here