8. the .keydown() event - bug in exercise? Stuck


#1



https://www.codecademy.com/courses/web-beginner-en-JwhI1/1/4?curriculum_id=50a3fad8c7a770b5fd0007a1#


"Oops, try again. Please follow the instructions on the Full Preview page to test your code.
" - this is displayed, even after I click on the object and press a key (I've tried all sorts of different keys, but shouldn't matter, right?)

$(document).ready(function() {
    $(document).keydown(function() {
        $('div').animate({left:'+=10px'},500);
    });
});


#2

Nope you need to click on the div first then press any key


#3

I've tried that too, it doesn't work after clicking and pressing any key...


#4

Odd working on my side.. Try refreshing your page if it still doesn't work paste in your HTML code


#5

That did the trick! Thanks for the help.


#6

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