<!DOCTYPE html>
<html>
  <head>
    <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
    <link href="https://nightly.datatables.net/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
    <script src="https://nightly.datatables.net/js/jquery.dataTables.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs5/jq-3.6.0/dt-1.11.3/b-2.0.1/datatables.min.css"/>
    <script type="text/javascript" src="https://cdn.datatables.net/v/bs5/jq-3.6.0/dt-1.11.3/b-2.0.1/datatables.min.js"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
    
    <meta charset=utf-8 />
    <title>DataTables - JS Bin</title>
  </head>
  <body>
    <div class="wrapper">
      <header>
        <p id="status-banner"></p>
        <h1>My Books</h1>
      </header>
      <main >
        <table id='books' style="width:100%;" class="table table-striped table-bordered nowrap display" cellpadding='10px'>
          <thead>
            <tr>
              <th>One</th>
              <th>Two</th>
              <th>Three</th>
            </tr>
          </thead>
        </table>
      </main>
    </div>
  </body>
</html>
 
:root {
  --primary: #ddd;
  --dark: #333;
  --light: #fff;
  --primary-color: #047aed;
  --secondary-color: #1c3fa8;
  --darkgrey-color: #385462;
  --dark-color: #152733;
  --shadow: 0 1px 5px rgba(104, 104, 104, 0.8);
}
html {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}
body {
  background: var(--dark);
  margin: 30px 50px;
  line-height: 1.4;
  background: -webkit-gradient(linear, left top, left bottom, from(var(--primary-color)), to(var(--dark-color))) fixed;
}
.wrapper {
  display: grid;
  grid-gap: 20px;
 
}
.dataTables_filter {
  position: relative;
  background: var(--light);
}
.dataTables_filter input {
  width: 200px;
  height: 32px;
  background: var(--primary);
  border: 1px solid #aaa;
  border-radius: 5px;
  box-shadow: 0 0 3px #ccc, 0 10px 15px #ebebeb inset;
  text-indent: 10px;
}
.dataTables_filter .fa-search {
  position: absolute;
  top: 10px;
  left: auto;
  right: 10px;
}
header {
  margin-left: 30px;
  color: var(--light)
}
main {
  display: block;
  margin: auto 30px;
  min-height: 400px;
  background: var(--primary);
  background-size: cover;
  background-position: center;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
 
$(document).ready( function () {
  var x =
[
{"one":"2018352845","date":"07/25/2018","time":"15:15:10"},
{"one":"2018354815","date":"07/26/2018","time":"17:05:15"},
{"one":"2018357762","date":"07/28/2018","time":"10:42:55"}
];
$('#books').DataTable({
  language: {
    search:"",
  },
    dom: 'Bfrtip',
    buttons: [{
        'text': '<i class="fa fa-plus-circle" aria-hidden="true"></i> New item',
        'className': "btn btn-success btn-sm ml-5 mb-1",
        'action': function(e, dt, node, config){
        }
      },
      {
        'text': '<i class="fa fa-arrow-circle-left" aria-hidden="true"></i> Back',
        'className': "btn btn-primary btn-sm ml-5 mb-1",
        'action': function(e, dt, node, config) {
        }
      }
    ],
    initComplete: function() {
      var btns = $('.dt-button');
      btns.removeClass('dt-button');
    },
data: x,
columns: [
{ data: 'one' },
{ data: 'date' },
{ data: 'time' }
]
});
$('[type=search]').each(function() {
    $(this).attr("placeholder", "Search...");
    $(this).before('<span class="fa fa-search"></span>');
  });
} );
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers