With that understanding, you??™ll build your own animation
object to demonstrate the concepts you??™ve learned so far. To cap it all off, you??™ll learn
how to use the JavaScript libraries talked about in Chapter 4 to handle these animation effects.
Why Use Visual Effects?
Visual effects sometimes have a reputation for being flashy or even gaudy. In some cases they
are, but animations can actually be quite helpful. Effects help to alert users or inform them
that stuff is happening on the page.
Traditionally, any interaction with a web page exhibited predictable feedback. You clicked
a link or a formsubmit button, and the browser icon would then begin rotating until the page
refreshed and completed loading. In an Ajax-driven application in which page refreshes can
disappear altogether, the user needs to be notified that certain actions have happened or are
in the process of occurring.
For example, Google applications such as Mail and Calendar indicate that they are in the
process of retrieving more data by using a loading indicator in the top-right corner of the
page, as seen in Figure 6-1.
Indicators and animations let users know that they are still in charge and that something
hasn??™t mysteriously broken.
Animations can also be put to good use when revealing or hiding information. Basic
scripts often just toggle visibility, but if users aren??™t paying close attention, they might not be
instantly aware of what just happened.
Pages:
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198