public Method

ScriptaculousHelper.draggable_element(element_id, options = {})

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.