jQuery Events - 8. The .keydown() effect Pls Help


#1


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

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


When I go into the preview my div won't animate and I can't figure out what is wrong with my code


Replace this line with your code.


#2

Did you click inside the window first?


#3

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