Wrap Shiny UI element with a hoverable tooltip contained in html div tags

wrap_hovertip(ui_element, hovertip)

Arguments

ui_element

Shiny UI element to wrap with hovertext

hovertip

text that will show as hover popup

Value

tags$div element around given Shiny UI element

Examples

wrap_hovertip(shiny::actionButton('id_example', 'example'), 'example')
#> <div title="example">
#>   <button id="id_example" type="button" class="btn btn-default action-button">example</button>
#> </div>