<html>
<header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.js"></script>
<style type="text/css">
table {
font-size: 12px;
box-sizing: border-box;
border-collapse: collapse;
background-color: transparent;
width: 684.333px;
}
td {
box-sizing: border-box;
padding: 0px 12px 0px 12px;
border: 1px solid red;
background-color: white !important;
color: black;
}
th {
box-sizing: border-box;
border: 1px solid blue;
height: 40px;
padding: 0px 12px;
}
</style>
</header>
<body>
<p>Header</p>
<table id="table_id" class="display">
<thead>
<tr>
<th></th>
<th></th>
<th>Head3</th>
<th>Head4</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>text</td>
<td>text</td>
<td>text</td>
<td><img style="width: 50; height: 20; padding-left: 10px; padding-right: 10px;" alt="1" src="https://cdn-icons-png.flaticon.com/512/5110/5110429.png"></td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td>text</td>
<td>text</td>
<td>22222</td>
</tr>
</tbody>
</table>
</body>
<script>
this.columns = [];
this.columns.push({ width: '48px' });
this.columns.push({ width: '52px' });
this.columns.push(null);
this.columns.push(null);
this.columns.push({ width: '30px' });
const config = {
searching: false,
scrollY: 200,
scrollX: true,
info: false,
paging: false,
lengthChange: false,
jQueryUI: true,
columns: this.columns,
autoWidth: false
};
$(document).ready( function () {
$('#table_id').DataTable(config);
} );
</script>
</html>
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. |