11.Filling out cases


Hi guys I am facing another problem in 11.filling out cases now. It shows me "Please follow the instructions on the Full Preview page to test your code." and in result tab I tried to push my arrow key on my laptop. It's not working. Is that because I am using the macbook? or it's something wrong in my code? Thx!

$(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
				$('img').animate({top: "-=10px"}, 'fast');
			// Right Arrow Pressed
			case 39:
				// Put our code here
				$('img').animate({left: "+=10px"}, 'fast');
			// Down Arrow Pressed
			case 40:
				// Put our code here
				$('img').animate({top: "+=10px"}, 'fast');


Oh I solved it myself. It's because I have to first click the result tab otherwise it can't receive information from my keyboard


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