Chapter 12: Working with JavaScript
572
As you may remember from the last chapter, JavaScript programmers use objects to represent real life
objects or concepts.
In the case of the Scriptaculous library, the animated effects are handled by an object
called...
More
Chapter 12: Working with JavaScript
572
As you may remember from the last chapter, JavaScript programmers use objects to represent real life
objects or concepts.
In the case of the Scriptaculous library, the animated effects are handled by an object
called Effect.
There are different types of effects, which are each called using different methods.
For
example, to create a shaking effect you need to call the Shake() method of the Effect object.
To create a
fading effect you use the Fade() method of the Effect object.
Some of these methods can take different
parameters that allow you to vary how the effect works.
In order to use the animated effects and other features of the Scriptaculous library, you need to add both
the prototype.
js library and the scriptaculous.
js library, which I have placed in a folder called
scriptaculous:
<script src=”scripts/scriptaculous/prototype.
js”
type=”text/javascript”></script>
<script src=”scripts/scriptaculous/scriptaculous.
js”
type=”text/javas
Less