inst/shinyapps/jaccard-shiny/ui/helpPopup.R

helpPopup <- function(title, content,
                      placement=c('right', 'top', 'left', 'bottom'),
                      trigger=c('click', 'hover', 'focus', 'manual')) {
  #https://gist.github.com/jcheng5/5913297
  tagList(
    singleton(
      tags$head(
        tags$script("$(function() { $(\"[data-toggle='popover']\").popover(); })")
      )
    ),
    tags$a(
      href = "#", class = "btn btn-mini", `data-toggle` = "popover",
      title = title, `data-content` = content, `data-animation` = TRUE,
      `data-placement` = match.arg(placement, several.ok=TRUE)[1],
      `data-trigger` = match.arg(trigger, several.ok=TRUE)[1],
      icon("question-circle")
      #tags$i(class="fa icon-question-sign")
    )
  )
}
ncchung/jaccard documentation built on Dec. 31, 2019, 8:20 p.m.