- Built on top of Prototype, script.aculo.us provides effects, drag-and-drop events, sliders and AJAX update-in place fields amongst its many features. Accessible controls exist to make data entry easy (and sometimes even fun), stop relying on a page full of nothing but text boxes.
Prototype is rapidly approaching a new release, adding some brand new features:
One of Prototype's new features is the ability to add additional methods to XHTML element objects. While this has been possible in some circumstances by extending the prototype of an object, the new Element.extend functionality can add methods to individual objects. Whats more, it automatically happens when you call...
... the $() and $$() functions
Handy functions, especially because of their terseness. The $() function in its normal use is mere shorthand for the oft-used and oft-misspelled getElementById() function, but supplied with multile parameters it will return an array of the elements with those ids. Now it will even extend each one.
The $$() is an even more flexible beast, returning all elements for a CSS selector *and* extending them. Powerful stuff, for example:
$$('div#main img.photos').each().hide() // Would hide all photos within the 'main' container element
Many other functions exist in prototype or will appear in the next version to make our lives easier and the users' lives better. The $F() function to get the value of any form field, an each() method for ruby-style loops, $R() for creating iteratable-ranges between specified bounds, all exciting additions to a language on the up.