Apply datatable tooltip to the datatable cell by jquery


<script type="text/javascript">

$(document).ready(function() {

    $('#newcasemarktable tbody tr').each( function() {
       var sTitle = "Tooltip heading";
        var nTds = $('td', this);
     
       
        this.setAttribute( 'title', sTitle );
    } );
   
    /* Init DataTables */
    var newcasetable = $('#newcasemarktable').dataTable();
   
    /* Apply the tooltips */
    newcasetable.$('tr').tooltip( {
        "delay": 0,
        "track": true,
        "fade": 250
    } );
} );
</script>


you may use .on method for draw.dt event ==> used for after loading dataTable data.

$('#example').on( 'draw.dt', function () {

    alert( 'Table redraw' );

} );


Download sample Code with Example



if confliction with jquery-ui or another js file please prefer below post==>



Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Remove GIT integration from VSCode