2/5 $('div').animate({ top: '+=100px', 500 },1000);


#1

$(document).ready(function(){
// Fill in the blanks!
$('div').animate({ top: '+=100px', 500 },1000);
});

Why my code isn't working?


#2

You've given two speeds for the animate effect. Try removing the '500' and your code should work. Should look like this:

.animate({ top: '+=100px' }, 1000);


#3

yeah forget to change the curly brace and it was not correct when using the html div


#4

$(document).ready(function(){
// Fill in the blanks!
$('img').animate({ top: '+=100px' }, 1000);
}); // copy this code and it should work


#5

I tried it and it didnt work