Welcome to the Treehouse Community
Looking to learn something new?
jQuery Keydown Movement
I am trying to make the plane img go across the screen. I have attached my code below. What am I doing wrong? Do I need to incorporate a specific script plug-in?
Tom Mertz15,254 Points
I just loaded up your codepen and I was able to get the image icon to move across the screen and go up, down, and back with wasd. Was that what you were trying to do?
James Barnett39,199 Points
Your JQuery works fine, I'm not sure what you are seeing. I forked your pen, added in plane & background image instead of the local images that codepen was 404'ing on. I also changed the delay on
'fast' is is 200ms down to
1 to reduce the lag.