11 filling out with cases


#1

Everything works but not up key

$(document).ready(function() {
    $(document).keydown(function(key) {
        switch(parseInt(key.which,10)) {
			// Left arrow key pressed
			case 37:
				$('img').animate({left: "-=10px"}, 'fast');[details=Summary]This text will be hidden[/details]
				break;
			// Up Arrow Pressed
			case 38:
				$('img').animate({top: "-=10x"}, 'fast');
				break;	// Put our code here
							// Right Arrow Pressed
			case 39:
				$('img').animate({left: "+=10px"}, 'fast');
				break;	// Put our code here
							// Down Arrow Pressed
			case 40:
					$('img').animate({top: "+=10px"}, 'fast');
				break;
		}
	});
});.

#2

Look closely there is an unnecessary period after the semi colon,


#3

Thanks i found mistake but how i can remove post


#4

You can't remove a post entirely but you can delete a reply in the post.


#5

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