I have everything setup so that whenever I hold one of the Arrow Keys, my DIV will move in the direction that I push. But when I hold one of the Arrow Keys, and then hold another one at the same time (i.e. UpandRight) the DIV only moves in the direction that was first pushed, instead of moving Diagonally.
I am trying to make a DIV move up and down on the page, by itself. How do I do this? I want it to move as soon as the page loads, without pressing or clicking anything. And I want it to go in a "loop", so it will go back and forth constantly (side to side/up and down).
I have a DIV set up to move whenever I press an Arrow Key. It moves fine with one push, by holding the arrows is a little messed up. When I hold an Arrow Keys, the DIV moves in one increment THEN it continues to move, as I hold the Arrow Key.
How do I get rid of the first increment? I want the DIV to move consistently when I hold an Arrow Key. Here is my JavaScript code: