jQuery events 11/12


Some problems in this lesson:
1. The message shows "Did you call the .animate()function on your ("div")?". I don't see anything wrong with my code.
2. I don't understand what "parseInt" in the js file means.


Can someone explain please?

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");
			// Up Arrow Pressed
			case 38:
				$("img").animate({top: "-=10px"}, "fast");
			// Right Arrow Pressed
			case 39:
				$('img').animate({left: "+=10px"}, "fast");
			// Down Arrow Pressed
			case 40:
				$("img").animate({top: "+=10px"}, "fast");


There's some explanation on the old Codecademy forums. See here.


And about your error,

You have those img quotes different. Change them to "" (on both)


There are a couple of these in Codecademy tutorials. Really need to be fixed because it gets frustrating.