title: Add tool tip in a datatable in R Shiny
body: <p>I am trying to add tool tip using JS script <em>attr</em> function,some how the written script is not giving the desired result (adding tool tip for the 1st column of the datatable).As I am new JS Script so unable to debug the error, can anyone suggest me why the below code is not giving me the correct result. Here is the piece of code:</p>
  
  <pre><code>library(shiny)
  library(DT)
  
  shinyApp(
  ui = fluidPage(
  
  DT::dataTableOutput("table2")
  
  ),
  server = function(input, output) {
  
  output$table2&lt;-DT::renderDataTable({
    responseDataFilter2_home&lt;-iris[,c(4,3,1)]
    displayableData&lt;-as.data.frame(responseDataFilter2_home, stringAsFactors = FALSe, row.names = NULL)
  },server = TRUE, selection = 'single',callback = JS("table.on('dblclick.dt', 'td', function(nRow, aData){
                                                           var row=table.cell(this).index().row;
                                                          var full_text = aData[1] + ','+ aData[2]
                                                          $('td:eq(1)', nRow).attr('title', full_text);
                                                           Shiny.onInputChange('rows_home',[row, Math.random()]);});
                                                           table.on('click.dt', 'td', function(nRow, aData) {
                                                           var k=table.cell(this).index().row;
                                                          var full_text = aData[1] + ','+ aData[2]
                                                          $('td:eq(1)', nRow).attr('title', full_text);
                                                           if(table.rows('.selected').indexes().toArray()!= '' &amp;&amp; table.rows('.selected').indexes().toArray() ==k){
                                                           k=-1;}
                                                           Shiny.onInputChange('rows_up_home',[k, Math.random()]);
                                                           });"),
  escape=FALSE,options=list(paging=FALSE,searching = FALSE,ordering=FALSE,scrollY = 400,scrollCollapse=TRUE,
                            columnDefs = list(list(width = '800%', targets = c(1)))),rownames=FALSE,colnames="Name")
  
  }
  )
  </code></pre>