I am trying to make something like game and i came to problem.I was google-ing a lot and couldn't find answer.I am trying to use jquery "keydown" options to change my "element" thrue the page.
Example: if right key
is pressed it needs to detect previous position of "box" and to move it "+10px" right.
I hope u have any tutorial or suggestion for me where to start :)
This is where i came to
HTML
<div id="movingBox"></div>
CSS
#movingBox{
width:20px;
height:20px;
background:blue;
}
U can find my jsfiddle here