Method: ActionView::Helpers::ScriptaculousHelper#draggable_element
- Defined in:
- lib/action_view/helpers/scriptaculous_helper.rb
#draggable_element(element_id, options = {}) ⇒ Object
Makes the element with the DOM ID specified by element_id draggable.
Example:
<%= draggable_element("my_image", :revert => true)
You can change the behaviour with various options, see http://script.aculo.us for more documentation.
161 162 163 |
# File 'lib/action_view/helpers/scriptaculous_helper.rb', line 161 def draggable_element(element_id, = {}) javascript_tag(draggable_element_js(element_id, ).chop!) end |