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


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');
			// 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');

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)


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.

Did you click on the window or object?

Write ‘bottom’ instead of the last ‘top’

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

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.

1 Like

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.