Animating on a Curved Path, using SVG & JavaScript

Code

Result

Visualized/Editable Path