Skip to content

Commit

Permalink
Added in spacebar scrolling, and made keyboard events more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan committed Feb 24, 2015
1 parent 89d7bd6 commit 227810b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assets/jquery.alton.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,21 +578,31 @@
switch (e.which) {
case 40: // arrowUp
$(document).moveDown(e);
e.preventDefault();
break;
case 32: // pageUp
$(document).moveDown(e);
e.preventDefault();
break;
case 33: // pageUp
$(document).moveDown(e);
e.preventDefault();
break;
case 34: // pageUp
$(document).moveUp(e);
e.preventDefault();
break;
case 38: // arrowDown
$(document).moveUp(e);
e.preventDefault();
break;
case 50: // home
$(document).scrollTo('.' + settings.firstClass);
e.preventDefault();
break;
case 49: // end
$(document).scrollTo(last);
e.preventDefault();
break;
}
});
Expand Down

0 comments on commit 227810b

Please sign in to comment.