library(shiny)
library(DT)
shinyApp(
ui = fluidPage(
DT::dataTableOutput("mtcarsTable")
),
server = function(input, output) {
output$mtcarsTable <- DT::renderDataTable({
DT::datatable(datasets::mtcars[,1:3],
options = list(rowCallback = JS(
"function(row,data,displayIndex,displayIndexFull) {",
"for (var i = 0; i < 5; i++) {",
"var full_text = data;",
"$('td', row).attr('title', full_text);",
"}",
"}")
)
)
})
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.