Super Mario moves, excercise is not complete!


My Mario moves correctly but the excercise isnt complete and still asks me to move the img

$(document).ready(function() {
    $(document).keydown(function(key) {
        switch(parseInt(key.which,10)) {
            // Left arrow key pressed
            case 65:
                $('img').animate({left: "-=10px"}, 'fast');
            // Up Arrow Pressed
            case 87:
                // Put our code here
                    $('img').animate({top: "-=10px"},'fast');
            // Right Arrow Pressed
            case 68:
                $('img').animate({left: "+=10px"},'fast');
                // Put our code here
            // Down Arrow Pressed
            case 83:
                $('img').animate({top: "+=10px"},'fast');
                // Put our code here


Don't try to use WASD for controlling Mario. The website checks you code by doing its own little checks to verify that when the keys are pressed that Mario actually does something. Change it back to
Case 37
Case 38
Case 39
Case 40

Barry Allen


I had it with the arrows but it did the same!


Maybe try putting a default case in your switch statement. Your code is otherwise completely identical to mine, and i have finished jQuery... I don't know why jQuery is doing this to you :pensive:

Barry Allen


Maybe ill try from another browser or another computer:P

Thank you!


I had the same problem but found that my code was in fact correct, but had to click on the in full screen in order for the code to operate...


Okay so this tripped me up, I am using a kind of old samsung chromebook, I was using the UK keyboard and couldn't complete this course because this challenge wasn't working until I changed my keyboard to a US, now it all workd