Description Usage Arguments Details Examples
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).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | jqui_add_class(
ui,
className,
duration = 400,
easing = "swing",
complete = NULL
)
jqui_remove_class(
ui,
className,
duration = 400,
easing = "swing",
complete = NULL
)
jqui_switch_class(
ui,
removeClassName,
addClassName,
duration = 400,
easing = "swing",
complete = NULL
)
|
ui |
The target ui element(s) to be manipulated. Can be
|
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. |
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.
1 2 3 4 5 6 7 8 | ## 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')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.