add-remove-html-class | R Documentation |
Only works in template framework provided by 'shidashi' package,
see use_template
add_class(selector, class, session = shiny::getDefaultReactiveDomain())
remove_class(selector, class, session = shiny::getDefaultReactiveDomain())
selector |
'CSS' selector |
class |
class to add or to remove from selected elements |
session |
shiny session |
No value is returned
server <- function(input, output, session){
# Add class `hidden` to element with ID `elemid`
add_class("#elemid", "hidden")
# Remove class `hidden` from element with class `shiny-input-optional`
remove_class(".shiny-input-optional", "hidden")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.