Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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"
    });
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: value from getelementbyid 
Javascript :: jquery class list 
Javascript :: how will it look when there is a container inside a a row bootstrap 
Javascript :: how replace 0 without replace 10 in js 
Javascript :: javascript foreach object key 
Javascript :: alert confirm prompt javascript 
Javascript :: js check for class in classList 
Javascript :: string to date angular 
Javascript :: columndefs in datatable not working while setting width jquery 
Javascript :: js map value in range 
Javascript :: clear cookies js 
Javascript :: moment get time am pm 
Javascript :: javascript update url without reload 
Javascript :: divide intagers javascript 
Javascript :: javascript print numbers in the given range 
Javascript :: js array into object 
Javascript :: mobile number regex javascript 
Javascript :: javascript how to sort nodes from dom 
Javascript :: div outside click event jquery 
Javascript :: create random aleatory token javascript 
Javascript :: @editorjs/list window not defined 
Javascript :: check if an HTML element has any children 
Javascript :: regex exec fails twice 
Javascript :: detect mi browser 
Javascript :: convert text to binary javascript 
Javascript :: linebreak-style 
Javascript :: next js next/head head 
Javascript :: Error: open failed: EACCES (Permission denied) react native 
Javascript :: ljs date get minor date 
Javascript :: byte to kb javascript 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =