Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkKey(e) {
- e = e || window.event;
- if (e.keyCode == '38') {
- // up arrow
- window.scrollBy(0, -100);
- }
- else if (e.keyCode == '40') {
- // down arrow
- window.scrollBy(0, 100);
- }
- }
- document.onkeydown = checkKey;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement