visual_effect
- 1.0.0
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3 (0)
- 2.1.0 (2)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (-10)
- 3.0.9 (-2)
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
visual_effect(name, element_id = false, js_options = {})
public
Returns a JavaScript snippet to be used on the Ajax callbacks for starting visual effects.
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 http://script.aculo.us for more documentation.