# NOT RUN {
if(interactive()){
library(shiny)
library(magrittr)
ui <- fluidPage(
column(2),
column(
8,
actionButton('a', 'On button') %>%
bsHoverPopover(
title = "title a",
content = "popover works on a button",
placement = "bottom"
),
tags$a("On link") %>%
bsHoverPopover(
title = "title b",
content = "popover works on a link",
placement = "bottom"
),
div(
tags$b("general element"),
style =
'
height: 100px;
background-color: cornflowerblue;
'
) %>%
bsHoverPopover(
title = "general element",
content = "popover works on a 'div'",
placement = "right"
)
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab