JSFiddle - React, Tailwind, and code Playground

by sektor1987

HTML

<link rel="stylesheet" href="//cdn.datatables.net/1.10.2/css/jquery.dataTables.css">
<script src="//cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Start date</th>
                <th>Salary</th>
            </tr>
        </thead>
 
        <tfoot>
            <tr>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Start date</th>
                <th>Salary</th>
            </tr>
        </tfoot>
 
        <tbody>
            <tr>
                <td>Tiger Nixon</td>
                <td>System Architect</td>
                <td>Edinburgh</td>
                <td>61</td>
                <td>2011/04/25</td>
                <td>$320,800</td>
            </tr>
            <tr>
                <td>Garrett </td>
                <td>Accountant</td>
                <td>Tokyo</td>
                <td>63</td>
                <td>2011/07/25</td>
                <td>$170,750</td>
            </tr>
            
            <tr>
                <td>ZoWinGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett WintersGarrett...

CSS

/*span.td-container {
  height: 34px !important;
  overflow-y : hidden;  
  display: inline-block;  
} */

JavaScript

$(document).ready(function() {
    /*
     * First step is to create title attributes for the rows in the table
     * This isn't needed if the required 'title' attribute is already set in the HTML in the
     * DOM 
     */
 $('#example tbody tr td').each( function() {
    this.setAttribute( 'title', $(this).text());
});


     
    /* Init DataTables */
    var oTable = $('#example').dataTable();
     oTable.$('td').tooltip( {
"delay": 0,
"track": true,
"fade": 250
} );

} );