Filling out the cases. (Please follow the instructions on the Full Preview page to test your code.)


#1

Hi,

I managed to move the image once but after that It doesn't seem to move at all. The error message I receive is. [Please follow the instructions on the Full Preview page to test 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

After clicking on Save & Submit button click on the window then move the object(you can see the instruction next to Back to editor button)


#3

This is what I get.

"Please press the required key down on [object Object]."

None of the arrow keys seem to work on the image.


#4

Did you click on the window or object?


#5

Write 'bottom' instead of the last 'top'


#6

yep, i get the same. It just won't work. I'm on a chromebook, does that have to do anything with it?


#7

I myself have been using a Chromebook and so far all the challenges have worked. I don't think it's because of that. On this challenge itself though, the only key that works is the left key to move the sprite. I noticed that a couple of yellow triangles(left of the lines of code) shows up saying "mixed spaces and tabs". Not sure what that means.


#8

You have to hold the cursor by clicking the mouse in to the picture, since we are pressing down the document. Then start pressing the left, right, up or down arrow keys.