2. more practive with .animate()



error message keep saying to make sure I add px to 100 because it doesnt move

    // Fill in the blanks!
    $('img').animate({ top: '+=100px'}, 1000);


Looks good. Try to refresh page.


i tried that and reset the code and restarted my computer


this was my code and it worked fine for me. check you timing looks like its missing these ' '


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

This is my code and yeah works absolutely fine. You don't need to add px. Just leave it as 100 ({top: '+=100'})


@tagjumper12193, your code worked, to pass this section.

I wrote it to work on keypress, but not what they wanted, which does work: ...

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


Got it working my code was right idk why it just started working maybe my cache was clean out


I kept getting a syntax error (before I even entered any code). I just erased the code they had already written and started from scratch. worked fine.


seem to be having the exact same problem, syntax problems before i've even started, i'll try your recommendation!


Did it work? (typing more to meet 20 character limit...please ignore)


Yes it did! Legendary, cheers for the tip. Much appreciated


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