tags:

views:

34

answers:

1

Hi all,

I'm doing this :

source.offset({ top: top + 10 + (current)*60 , left: left + 10 });

What I would like to do is to animate the move. So I've done :

source.animate({left: left + 10, top:top + 10 + (current)*60}, 500, function() {    // Animation complete.});

But it's not going to the right place. Although with the first version it was ok.

What am I doing wrong ?

Thanks for your help

A: 

I tested the code you provided, and just like yours, the offset() worked, but the animate() didn't work for me.

Then I gave the element I tested with "position:relative;" in the CSS and it worked.

Could that be the issue? Try giving it relative positioning.

RightSaidFred