JavaScript tutorial:
Animating text objects


Use your JavaScript Editor to open MoveText.htm (in the Tutorial folder inside your JavaScript Editor folder) and examine the code.

To run the code click on the Show Internal Viewer button, or
Click here to open MoveText.htm in the browser.

Moving text is very similar to moving images: instead of using the <img> tag, we use the <div> tag.

To make things more interesting, the script moves the text in a figure 8.

Try experimenting by placing other objects inside the <div> </div> tags: they will all be animated together.