Closed systats closed 6 years ago
Hi @systats , sorry for the late reply.
Currently, there is no function like shinyjs::hidden()
that can be used to hide an element in the UI at the startup, however, you can use jqui_hide()
in the Server to hide a div() like this:
library(shiny)
library(shinyjqui)
ui <- fluidPage(
actionButton("show", "Show"),
div(id = "msg", "foo")
)
server <- function(input, output, session) {
jqui_hide("#msg", effect = "blind")
observeEvent(input$show, {
jqui_show("#msg", effect = "blind")
})
}
shinyApp(ui, server)
The UI version of jqui_hidden()
is not hard to implement. If you really need it, I can add it into the update list of the next version :)
Thanks, works perfectly fine!
Hi folks, really great shiny package :) Do you know how to hide a div() element in the UI from the start on and show it later by jqui_show (like hidden() from shinyjs)?
Thanks in advance, Simon