Skip to content

Instantly share code, notes, and snippets.

@slopp
Created August 9, 2017 15:04
Show Gist options
  • Save slopp/41705b3100eff7f73b9ed62a7386b266 to your computer and use it in GitHub Desktop.
Save slopp/41705b3100eff7f73b9ed62a7386b266 to your computer and use it in GitHub Desktop.
Screen Height Demo
library(shiny)
ui <- fluidPage(
textOutput("height"),
tags$script('
$(window).bind("resize", function () {
Shiny.onInputChange("height", $(document).height());
});'
)
)
server <- function(input, output){
output$height <- renderText({
input$height
})
}
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment