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_elementIdentifies an HTML element, specified by
idattribute value, as supporting user efforts to drag it around the screen and potentially drop it on a receiving element.drop_receiving_elementIdentifies an HTML element, again by
idattribute 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 supportsclass-based constraints on which objects to accept. It also supports changing theclassof the receiving element to give users visual feedback when they’ve positioned a draggable object over a container that could accept it.sortable_elementIdentifies an HTML element, again by
idattribute value, as a collection users can reorder, making an Ajax call when changes occur.visual_effectProvides access to the Script.aculo.us library’s collection of visual effects, applying them to an HTML element specified by
id.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access