Returns a JavaScript snippet to be used on the Ajax callbacks for starting
visual effects.
Example:
<%= link_to_remote "Reload", :update => "posts",
:url => { :action => "reload" },
:complete => visual_effect(:highlight, "posts", :duration => 0.5)
If no element_id is given, it assumes "element" which
should be a local variable in the generated JavaScript execution context.
This can be used for example with drop_receiving_element:
<%= drop_receiving_element (...), :loading => visual_effect(:fade) %>
This would fade the element that was dropped on the drop receiving element.
For toggling visual effects, you can use :toggle_appear,
:toggle_slide, and :toggle_blind which will alternate
between appear/fade, slidedown/slideup, and blinddown/blindup respectively.
You can change the behaviour with various options, see script.aculo.us for more documentation.