shinyjqui (version 0.3.3)

Animation_effects: Animation effects.

Description

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(selector, effect, options = NULL, duration = 400, complete = NULL)

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

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

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

Arguments

selector

Deprecated, just keep for backward compatibility. Please use ui and operation parameters instead.

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

Run this code
# NOT RUN {
  # 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')
# }

Run the code above in your browser using DataLab