<!DOCTYPE html>
<html>
  <head>
    <script src="https://code.jquery.com/jquery-3.6.3.js"></script>
<link href="https://cdn.datatables.net/v/dt/dt-1.13.11/datatables.min.css" rel="stylesheet">
 
<script src="https://cdn.datatables.net/v/dt/dt-1.13.11/datatables.min.js"></script>
    <link href="https://cdn.datatables.net/plug-ins/a5734b29083/features/alphabetSearch/dataTables.alphabetSearch.css" rel="stylesheet" type="text/css" />
    <script src="https://cdn.datatables.net/plug-ins/a5734b29083/features/alphabetSearch/dataTables.alphabetSearch.js"></script>
    <meta charset=utf-8 />
    <title>DataTables - JS Bin</title>
  </head>
  <body>
    <div class="container">
      <table id="example" class="display" width="100%">
        <thead>
          <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Extn.</th>
            <th>Start date</th>
            <th>Salary</th>
          </tr>
        </thead>
        <tfoot>
          <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Extn.</th>
            <th>Start date</th>
            <th>Salary</th>
          </tr>
        </tfoot>
      </table>
    </div>
  </body>
</html>
 
var table = new DataTable('#example', {
  dom: 'Afrtip',
  ajax: '/ajax/objects.txt',
  columns: [
    { data: 'name' },
    { data: 'position' },
    { data: 'office' },
    { data: 'extn' },
    { data: 'start_date' },
    { data: 'salary' },
  ],
    initComplete: function () {
      this.api().alphabetSearch.recalc();
    }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers