11.Need some help with filling out the cases


Oops, try again. Did you call the .animate() function on your $('img') for each of the three additional cases?

$(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
			// Right Arrow Pressed
			case 39:
				// Put our code here
			// Down Arrow Pressed
			case 40:
				// Put our code here


The lesson goes funny when you use " double quotes in this lesson, please use single quotes around img


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