jquery left arrow key press

Solutions on MaxInterview for jquery left arrow key press by the best coders in the world

showing results for - "jquery left arrow key press"
Emilie
30 Jan 2017
1$("body").keydown(function(e) {
2  if(e.keyCode == 37) { // left
3    $("#showroom").animate({
4      left: "-=980"
5    });
6  }
7  else if(e.keyCode == 39) { // right
8    $("#showroom").animate({
9      left: "+=980"
10    });
11  }
12});
13