11 filling out with cases


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


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


Thanks i found mistake but how i can remove post


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


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