8)keydown effect,works but is not accepted


#1

this code works but why does this get accepted ?
$(document).ready(function(){
$(document).keydown(function(key){
$ ('div').animate({left:'+=10px'},500);
});

});
i doesnt go to full preview page and gives error:
Oops, try again.
Did you call the .animate() function on your $('div') ?
have tried in crome and firefox


Using .keydown()
#2

@cloudwhiz33788,
You will have to change your

 $ ('div').

into

$('div').