script.aculo.us is a powerful AJAX library that builds
(which is also included with Chickenfoot as prototype.js).
It is composed of several major components which are described on the
- Visual Effects
- Controls (DragDrop, Autocomplete, Sliders, etc.)
- Utils (for building DOM fragments)
Scriptaculous is designed so that most functions accept either an Element or an id
as an argument when some sort of node is required. For example, all of the following will
have the same effect on
// fp is the id for the main search box on Yahoo!
Effect.Shake($('fp')) // $() is shorthand for getElementById() in prototype.js
Fortunately, we have tweaked the library so that it can also accept
Match object so you need not worry about
nodes and their ids the following will work just fine:
Here is a script that demonstrates the use of Scriptaculous's autocomplete control.
It takes you to Google and adds autocomplete to the search box,
letting you autocomplete properties of the global
(Though the script may look complex, the majority of it is the CSS for the autocomplete dropdown.