11. Filling Out the Cases help please


#1


Oops, try again. Please follow the instructions on the Full Preview page to test your code.
My arrows in the keyboard do not move Mario when pressed...I don't know what to do, and I'm pretty certain that the code is right...
Can someone help me?

$(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

Hi,

Click the screen then move the arrow keys


#3

Thanks a lot it worked!


#4