Guest User

Untitled

a guest
Aug 14th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $(document).keydown(
  2. function(e)
  3. {
  4. if (e.keyCode == 39) {
  5. $("button:focus").next().focus();
  6.  
  7. }
  8. if (e.keyCode == 37) {
  9. $("button:focus").prev().focus();
  10.  
  11. }
  12.  
  13. if (e.keyCode == 40) {
  14. $("button:focus").next(+3).focus();
  15.  
  16. }
  17. if (e.keyCode == 38) {
  18. $("button:focus").prev(-3).focus();
  19.  
  20. }
  21. }
  22. );
Add Comment
Please, Sign In to add comment