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 script.aculo.us for more documentation.
Source Code
# File action_view/helpers/scriptaculous_helper.rb, line 164 def draggable_element(element_id, options = {}) javascript_tag(draggable_element_js(element_id, options).chop!) end
<code/>and<pre/>for code samples.