O'Reilly logo

Learning Rails: Live Edition by Edd Dumbill, Simon St. Laurent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ScriptaculousHelper

Like the PrototypeHelper methods, ScriptaculousHelper methods provide ready Ruby-based access to JavaScript components in the browser. While Prototype focuses on basic Ajax communications, Script.aculo.us focuses more on actions and special effects:

draggable_element

Identifies an HTML element, specified by id attribute value, as supporting user efforts to drag it around the screen and potentially drop it on a receiving element.

drop_receiving_element

Identifies an HTML element, again by id attribute value, as a container where users can drop draggable objects and expect a response. When the drop happens, the code this creates can make a remote Ajax call or a local JavaScript call, and supports class-based constraints on which objects to accept. It also supports changing the class of the receiving element to give users visual feedback when they’ve positioned a draggable object over a container that could accept it.

sortable_element

Identifies an HTML element, again by id attribute value, as a collection users can reorder, making an Ajax call when changes occur.

visual_effect

Provides access to the Script.aculo.us library’s collection of visual effects, applying them to an HTML element specified by id.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required