Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         _addKeyboardEvents: function() {
  2.             var scope = this;
  3.             $(document).keydown(function(e) {
  4.                 if (e.keyCode == 37) {
  5.                     scope._previousMedia();
  6.                     return false
  7.                 } else if (e.keyCode == 39) {
  8.                     scope._nextMedia();
  9.                     return false
  10.                 }
  11.                 if (e.keyCode == 27) {
  12.                     if ($(e.target).parents("#media")) {
  13.                         scope.closePanel(true);
  14.                         $("#frontNavTop_href").focus();
  15.                         $("#frontNavTop_href").removeClass("keyboard-focused")
  16.                     }
  17.                 }
  18.             })
  19.         },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement