custom-callbacks | R Documentation |
Can be used as a 'true' or 'false' argument for custom method of js_calls.
runAnimation(..., ignoreInit = TRUE)
... |
Animation object(s) created with animation; if multiple animation objects are given then the animations will be chained. |
ignoreInit |
Should the animation be skipped when application is in initial state? |
library(shiny) library(shinyGizmo) ui <- fluidPage( actionButton("value", "Click me", class = "btn-primary"), br(), br(), conditionalJS( tags$h1("Hello", style = "display: none;"), "input.value % 2 === 1", jsCalls$custom( true = runAnimation(animation("jello"), animation("swing")), false = runAnimation(animation("slideOutRight")) ) ) ) server <- function(input, output, session) {} if(interactive()) { shinyApp(ui, server) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.