Last active
November 23, 2021 14:20
-
-
Save jrosell/b263b3b72e4caf0385cac1c7f7d0c4e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinyjs) | |
ui <- fluidPage( | |
useShinyjs(), | |
titlePanel("Shiny JavaScript"), | |
actionButton( | |
"javascript_update", | |
label = "Utilitzo javascript", | |
icon = icon("arrow-up") | |
), | |
actionButton( | |
"click_button", | |
label = "Actualitza botó", | |
onclick = " | |
$('#javascript_update > i').toggleClass('fa-arrow-up'); | |
$('#javascript_update > i').toggleClass('fa-arrow-down'); | |
" | |
) | |
) | |
server <- function(input, output, session) {} | |
shinyApp(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment