SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 206 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"

aculo.us).
The Fx.Base is very similar to Script.aculo.us, with the other classes extending it as need
be. Of the Fx classes, only three offer up specific animation functionality:
??? Fx.Style:Modifies an element style property over time
??? Fx.Scroll: Scrolls the window or an element with overflow:scroll
??? Fx.Slide: Shows or hides content using a slide animation
The other Fx classes are utility classes to handle various animation duties such as transitions
(Fx.Transitions) or applying multiple style effects to multiple elements at once
(Fx.Elements). The Style object resembles your approach in that the animation begins only
after the start() method is executed.
var anim = new Fx.Style('elementID', left',{duration:500});
anim.start(0, 100);
Summary
There can be a place for visual effects in your work because they can solve usability issues
inherent within even standard web pages. You built your own animation class and in the
process discovered many of the concepts discussed over the last few chapters. Finally, you saw
how the popular JavaScript libraries handle animation and which additional features they
have to offer up.
In Chapter 7, Stuart Langridge takes a good look at one of the most common uses for
DOM scripting: formvalidation.
CHAPTER 6 n VISUAL EFFECTS 146
Form Validation and
JavaScript
By Stuart Langridge
Most web applications use the
tag at one place or another.


Pages:
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6