I dont know what's wrong


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

The error I get is this: Did you call the .animate() function on your $('img') for each of the three additional cases?


Hi anubhav,

Sometimes the SCT will get thrown off if you use different quotes than it's expecting (usually only happens when it's been coded poorly). I think that if you switch your $("img")s to $('img') instead, you should be able to pass :slightly_smiling: