Created
June 19, 2012 19:03
-
-
Save yurivictor/2955919 to your computer and use it in GitHub Desktop.
Jquery left/right arrow pagination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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