Hi Nero,

Not sure if this is the cause of the problem for you, but in order for an element's left or top position to be animated, the element's position must be set to relative, absolute, or fixed.

You can do that either in the CSS stylesheet or right before the .animate() with something like .css('position','relative').


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jul 13, 2007, at 7:20 AM, Nero wrote:


Hey guys,

I'm new to jQuery so bear with me! I'm having real trouble just tring
to move an img across the page using jQuery - I can't get it to work!

At the moment I've got this:

      $("#ImgContainer" > img).animate({
          left: 50
      }, 1000);

But it does nothing. Can someone please help?

Thanks.


Reply via email to