Chapter 8. Animation and Special Effects

Dojo supports animation, as you’ll see in this chapter.

You can use animation to make elements fade out, or slide to a new location, or wipe to invisibility. You can also use animation to expand the size of elements when they’re clicked, display and fade out an image with drag-and-drop operations, and toggle elements from visible to hidden. You can even use animation to create blended colors. These effects are unexpected in Web pages, so they make your pages stand out.

Using Fades

You can use the dojo.fadeOut method to make elements fade out as the user watches. This effect is purely visual—the elements are still there, just invisible.

The example fade.html displays a <div> element with some text and an HTML ...

Get The Dojo Toolkit: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.