Description Usage Arguments Value See Also Examples
This function must be called from a Shiny app's UI in order for all other
shinyjs
functions to work.
You can call useShinyjs()
from anywhere inside the UI.
1 |
rmd |
Set this to |
debug |
Set this to |
html |
Set this to |
showLog |
Deprecated. |
Scripts that shinyjs
requires that are automatically inserted
to the app's <head>
tag.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
useShinyjs(), # Set up shinyjs
actionButton("btn", "Click me"),
textInput("element", "Watch what happens to me")
),
server = function(input, output) {
observeEvent(input$btn, {
# Run a simply shinyjs function
toggle("element")
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.