I’d like to sloothly move an image (or an element) from its actual X, Y location to X1, Y1.
When the distance between X and X1 is equal to that between Y and Y1 its easy.
But what if the X difference is say 100px and Y diff is 273px?
Being new to Javascript, I don’t want to re-invent the wheel!
Besides, since I’m learning, I do NOT want to use jQuery or the likes. I want pure javascript.
Please supply with simple script 🙂
One solution:
Live demo: http://jsfiddle.net/qEVVT/1/