Skip to content

Instantly share code, notes, and snippets.

@yurivictor
Created June 19, 2012 19:03
Show Gist options
  • Save yurivictor/2955919 to your computer and use it in GitHub Desktop.
Save yurivictor/2955919 to your computer and use it in GitHub Desktop.
Jquery left/right arrow pagination
(function ($) {
// SETS UP RIGHT/LEFT ARROW PAGINGATION
// Key 39 is the right arrow
// Key 37 is the left arrow
$('body').keyup(function (event)
{
if (event.keyCode == 39)
{
window.open('next-page-url','_self');
}
else if (event.keyCode == 37)
{
window.open('previous-page-url','_self');
}
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment