```r library(shinyjs)
useShinyjs()
addResourcePath("assets", system.file("tests", package = "shinyjs")) extendShinyjs(script = "assets/pagecol.js", functions = "pageCol")
disabled(actionButton("disabled", "this is disabled")) actionButton("toggle", "toggle") numericInput("num", "num", 5) textOutput("square") selectInput("col", "Colour:", c("red", "white", "yellow", "blue"))
observeEvent(input$toggle, { toggle("square") })
output$square <- renderText({ input$num ^ 2 })
observeEvent(input$col, { js$pageCol(input$col) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.