shinyjqui (version 0.3.3)

Class_effects: Class effects.

Description

Manipulate specified class(es) to matched elements while animating all style changes.

  • jqui_add_class(): Add class(es).

  • jqui_remove_class(): Remove class(es).

  • jqui_switch_class(): Switch class(es).

Usage

jqui_add_class(
  selector,
  className,
  duration = 400,
  easing = "swing",
  complete = NULL
)

jqui_remove_class( selector, className, duration = 400, easing = "swing", complete = NULL )

jqui_switch_class( selector, removeClassName, addClassName, duration = 400, easing = "swing", complete = NULL )

Arguments

selector

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

className

One or more class names (space separated) to be added to or removed from the class attribute of each matched element.

duration

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

easing

A string indicating which easing function to use for the transition.

complete

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

removeClassName

One or more class names (space separated) to be removed from the class attribute of each matched element.

addClassName

One or more class names (space separated) to be added to the class attribute of each matched element.

Details

These functions are the R wrappers of addClass(), removeClass() and switchClass() from jQuery UI library. They should be used in server of a shiny app.

Examples

Run this code
# NOT RUN {
  # in shiny ui create a span
  tags$span(id = 'foo', 'class animation demo')

  # in shiny server add class 'lead' to the span
  jqui_add_class('#foo', className = 'lead')
# }

Run the code above in your browser using DataLab