Skip to contents

Allow element(s) to show animation effects.

  • jqui_effect(): Apply an animation effect to matched element(s).

  • jqui_hide(): Hide the matched element(s) with animation effect.

  • jqui_show(): Display the matched element(s) with animation effect.

  • jqui_toggle(): Display or hide the matched element(s) with animation effect.

Usage

jqui_effect(ui, effect, options = NULL, duration = 400, complete = NULL)

jqui_show(ui, effect, options = NULL, duration = 400, complete = NULL)

jqui_hide(ui, effect, options = NULL, duration = 400, complete = NULL)

jqui_toggle(ui, effect, options = NULL, duration = 400, complete = NULL)

Arguments

ui

The target ui element(s) to be manipulated. Can be

effect

A string indicating which animation effect to use for the transition.

options

A list of effect-specific properties and easing.

duration

A string or number determining how long the animation will run.

complete

A function to call once the animation is complete, called once per matched element.

Details

These functions are R wrappers of effect(), hide(), show() and toggle() from jQuery UI library. They should be used in server of a shiny document.

Examples

if (FALSE) {
  # in shiny ui create a plot
  plotOutput('foo')

  # in shiny server apply a 'bounce' effect to the plot
  jqui_effect('#foo', 'bounce')

  # in shiny server hide the plot with a 'fold' effect
  jqui_hide('#foo', 'fold')

  # in shiny server show the plot with a 'blind' effect
  jqui_show('#foo', 'blind')
}