The event view won't let me use my keyboard to animate


#1


jQuery Events exercise 8 & 11.

Oops, try again. Please follow the instructions on the Full Preview page to test your code.


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


#2

When you go to the full page preview, click inside the window to give it focus, then move the div with a few key presses.


#3

Thank you that worked!


#4

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