JS Keyboard Nav
JS Keyboard Nav
Out of context: Reply #1
- Started
- Last post
- 1 Response
- sisu0
I've figured this out. Here's the code that works if anyone is interested:
$(document).keydown(function(e){
if(e.which == 38){ $('html, body').animate({scrollTop: $(window).scrollTop() - 300}); return false;}
else if(e.which == 40){ $('html, body').animate({scrollTop: $(window).scrollTop() + 300}); return false;}
});