jquery_effect

Trigger various jQuery effects on the target element. Mostly, each of these effects have their own action as a shortcut, for example action#show, action#hide.

Arguments:

  • target selects the affected element.
  • type is one of show, hide, remove, toggle, set_class, add_class, remove_class, toggle_class, fade_in, fade_out, slide_down, slide_up, slide_toggle, slide_fade_out, slide_fade_in, disable, enable, effect, or animate.
  • speed is a duration in milliseconds or a named jQuery duration. Effects and animations default to 350 milliseconds.
  • class is used by the class-changing types.
  • effect and options configure the effect type.
  • options and easing configure the animate type.
  • fadeout makes remove fade the element before removing it.

Prefer a dedicated action such as show, hide, or slide_toggle when one is available. For example:

{% button text="Toggle details" action={jquery_effect target="details" type="slide_toggle" speed=200} %}

Edit on GitHub