1

I want to achieve a complex animation sequence in jQuery and Javascript. My plan is to move a div along a path described by several x,y coordinates. I want to know:

  1. How can I force the div along a particular path
  2. How can I control how far along the path the div should be moved. For instance I want to be able to control how far it has got as a percentage of the total length of the path and to be able to animate it moving smoothly down it. I would also like to be able to tell it to jump instantly to a different point on the path, reverse and change speeds.

Is there a plugin or something similar that can achieve this. I'm aware this sort of thing would usually belong in flash but that isn't an option here.

Patrick Beardmore
  • 1,026
  • 1
  • 11
  • 35
  • I should make clear the path doesn't need to be anything too complicated. The bit I am uncertain about is how to control the movements forwards and back along the path. – Patrick Beardmore Mar 05 '11 at 21:27

1 Answers1

1

Well, I think you can take a look at jQuery.path

Manuel Pedrera
  • 5,347
  • 2
  • 30
  • 47
  • Wow, very interesting. to expand on the answer for the OP, you can simply create prior mathematical functions to calculate the "percentage" of the path to animate. It will take some thought and trial and error but totally possible with this plugin. – JRomero Mar 05 '11 at 21:29