Please follow the instructions on the Full Preview page to test your code


#1


https://www.codecademy.com/courses/web-beginner-en-JwhI1/2/3?curriculum_id=50a3fad8c7a770b5fd0007a1#


Oops, try again. Please follow the instructions on the Full Preview page to test your code.
I dont know whats wrong.

Replace this line with your code. 
$(document).ready(function() {
    $(document).keydown(function(key) {
        switch(parseInt(key.which,10)) {
			// Left arrow key pressed
			case 37:
				$("img").animate({left:"-=10px"}, 'fast');
				break;
			// Up Arrow Pressed
			case 38:
				$("img").animate({top:"-=10px"}, "fast");
				break;
			// Right Arrow Pressed
			case 39:
				$("img").animate({left:"+=10px"}, "fast");
				break;
			// Down Arrow Pressed
			case 40:
				$("img").animate({top:"+=10px"}, "fast");
				break;
		}
	});
});


#2

Tiny inconsistency with quotes, but shouldn't matter. Still, though...

When you open the full page view are you pressing the arrow keys? Start with Right and Down a few times, then pause a couple of seconds and check for a message at the bottom. Then return to exercise.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.