Advertisement
Fugiman

Arrow Navigation

Mar 18th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. $(document).keyup(function(e) {
  3.   if(e.ctrlKey || e.altKey || e.metaKey) return;
  4.     switch(e.keyCode) {
  5.       case 37: // Left arrow
  6.         window.location = "http://questionablecontent.net/view.php?comic=<?php echo $prev; ?>"; break;
  7.       case 39: // Right arrow
  8.         window.location = "http://questionablecontent.net/view.php?comic=<?php echo $next; ?>"; break;
  9.   }
  10. });
  11. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement