<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>
<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' 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;
-color: #047aed;
-color: #1c3fa8;
-color: #385462;
-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: gradient(linear, left top, left bottom, from(var(-color)), to(var(-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>');
});
You can jump to the latest bin by adding /latest
to your URL
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + [ | Indents selected lines |
ctrl + ] | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Clone Bin |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |