Hello Charlotte --
I know that the way Shiny processes some of the code makes it a little more difficult to get that custom functionality you're looking for -- at least for me. Give this one a try:
library(shiny)
ui<-fluidPage(
tags$p(style='text-align:center;','Top of the page!'),
tags$div(style='text-align:center;',tags$button(type='button',onClick='$("html,body").animate({scrollTop:$("#myAnchor").offset().top},500)',class='btn btn-primary','Go to Anchor')),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),tags$br(),
tags$p(name='myAnchor',id='myAnchor',style='text-align:center;','Bottom of the page!')
)
server<-function(input,output,session){
}
shinyApp(ui,server)
~Laz Peterson
Paravis, LLC
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/5230ae7f-77d4-4f1b-8b31-35dc7bbd981e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.