Filling out the cases


#1


Stuck on Filling out the cases


I have tried copying other peoples codes as well as using the one i have written but nothing works not sure if its my browser (chrome) or maybe i am just missing something. Appreciate any feedback
Oops, try again. 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

Tried it 5 mins later in the small screen it worked but not when it went to full screen. waited couple of mins and it worked in the full screen, must of just been buggy.


#3

The trick is to just play with it for awhile. Then return to Editor.


#4

I'm having the exact same problem. Image is moving on the small screen but will not move on full screen. Even waited for a few minutes and still nothing. Can't progress onto the next course. :frowning:


#5

Oh wait never mind. Tried doing it on a different browser and it worked. :+1:


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.