Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLogan Eppley
Courses Plus Student 26,697 PointsjQuery 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?
2 Answers
Tom Mertz
15,254 PointsI 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 Barnett
39,199 PointsYour 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 .animate
from 'fast'
is is 200ms down to 1
to reduce the lag.