Filing out the cases-----> dont work


#1

why do i get this mesage when i press save and submit
"Oops, try again. Did you call the .animate() function on your $('img') for each of the three additional cases?"

this is my code, and its work, because Mario is moving in all direction!

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

Note the quotation marks in the example. Just in case the SCT is looking at these, it may be advisable to match yours to the example.


#3

yes, you were right. But still, i was alwause thinking that sigle and double quotes are doing the same job!!!
Anyway, thanx man!!


#4

Normally it shouldn't matter. In cases such as this where the lesson checker is examining our code as string content, exact match is all it can allow to pass. It's a small oversight on the part of the course author, but one we can live with once we know about it.