Answers for "jquery left arrow key press"

0

jquery left arrow key press

$("body").keydown(function(e) {
  if(e.keyCode == 37) { // left
    $("#showroom").animate({
      left: "-=980"
    });
  }
  else if(e.keyCode == 39) { // right
    $("#showroom").animate({
      left: "+=980"
    });
  }
});
Posted by: Guest on February-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language