<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.7/b-3.1.2/b-colvis-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/datatables.min.css" rel="stylesheet">
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.7/b-3.1.2/b-colvis-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/datatables.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
<body>
<div class="container">
<table id="datatable" class="display nowrap" style="width:10px; margin: 0">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
<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>$3,120</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Director</td>
<td>Edinburgh</td>
<td>63</td>
<td>2011/07/25</td>
<td>$5,300</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$4,800</td>
</tr>
<tr>
<td>Cedric Kelly</td>
<td>Javascript Developer</td>
<td>Edinburgh</td>
<td>22</td>
<td>2012/03/29</td>
<td>$3,600</td>
</tr>
<tr>
<td>Jenna Elliott</td>
<td>Financial Controller</td>
<td>Edinburgh</td>
<td>33</td>
<td>2008/11/28</td>
<td>$5,300</td>
</tr>
<tr>
<td>Brielle Williamson</td>
<td>Integration Specialist</td>
<td>New York</td>
<td>61</td>
<td>2012/12/02</td>
<td>$4,525</td>
</tr>
<tr>
<td>Herrod Chandler</td>
<td>Sales Assistant</td>
<td>San Francisco</td>
<td>59</td>
<td>2012/08/06</td>
<td>$4,080</td>
</tr>
<tr>
<td>Rhona Davidson</td>
<td>Integration Specialist</td>
<td>Edinburgh</td>
<td>55</td>
<td>2010/10/14</td>
<td>$6,730</td>
</tr>
<tr>
<td>Colleen Hurst</td>
<td>Javascript Developer</td>
<td>San Francisco</td>
<td>39</td>
<td>2009/09/15</td>
<td>$5,000</td>
</tr>
<tr>
<td>Sonya Frost</td>
<td>Software Engineer</td>
<td>Edinburgh</td>
<td>23</td>
<td>2008/12/13</td>
<td>$3,600</td>
</tr>
<tr>
<td>Jena Gaines</td>
<td>System Architect</td>
<td>London</td>
<td>30</td>
<td>2008/12/19</td>
<td>$5,000</td>
</tr>
<tr>
<td>Quinn Flynn</td>
<td>Financial Controller</td>
<td>Edinburgh</td>
<td>22</td>
<td>2013/03/03</td>
<td>$4,200</td>
</tr>
<tr>
<td>Charde Marshall</td>
<td>Regional Director</td>
<td>San Francisco</td>
<td>36</td>
<td>2008/10/16</td>
<td>$5,300</td>
</tr>
<tr>
<td>Haley Kennedy</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>43</td>
<td>2012/12/18</td>
<td>$4,800</td>
</tr>
<tr>
<td>Tatyana Fitzpatrick</td>
<td>Regional Director</td>
<td>London</td>
<td>19</td>
<td>2010/03/17</td>
<td>$2,875</td>
</tr>
<tr>
<td>Michael Silva</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>66</td>
<td>2012/11/27</td>
<td>$3,750</td>
</tr>
<tr>
<td>Paul Byrd</td>
<td>Javascript Developer</td>
<td>New York</td>
<td>64</td>
<td>2010/06/09</td>
<td>$5,000</td>
</tr>
<tr>
<td>Gloria Little</td>
<td>Systems Administrator</td>
<td>New York</td>
<td>59</td>
<td>2009/04/10</td>
<td>$3,120</td>
</tr>
<tr>
<td>Bradley Greer</td>
<td>Software Engineer</td>
<td>London</td>
<td>41</td>
<td>2012/10/13</td>
<td>$3,120</td>
</tr>
<tr>
<td>Dai Rios</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>35</td>
<td>2012/09/26</td>
<td>$4,200</td>
</tr>
<tr>
<td>Jenette Caldwell</td>
<td>Financial Controller</td>
<td>New York</td>
<td>30</td>
<td>2011/09/03</td>
<td>$4,965</td>
</tr>
<tr>
<td>Yuri Berry</td>
<td>System Architect</td>
<td>New York</td>
<td>40</td>
<td>2009/06/25</td>
<td>$3,600</td>
</tr>
<tr>
<td>Caesar Vance</td>
<td>Technical Author</td>
<td>New York</td>
<td>21</td>
<td>2011/12/12</td>
<td>$4,965</td>
</tr>
<tr>
<td>Doris Wilder</td>
<td>Sales Assistant</td>
<td>Edinburgh</td>
<td>23</td>
<td>2010/09/20</td>
<td>$4,965</td>
</tr>
<tr>
<td>Angelica Ramos</td>
<td>System Architect</td>
<td>London</td>
<td>36</td>
<td>2009/10/09</td>
<td>$2,875</td>
</tr>
<tr>
<td>Gavin Joyce</td>
<td>Developer</td>
<td>Edinburgh</td>
<td>42</td>
<td>2010/12/22</td>
<td>$4,525</td>
</tr>
<tr>
<td>Jennifer Chang</td>
<td>Regional Director</td>
<td>London</td>
<td>28</td>
<td>2010/11/14</td>
<td>$4,080</td>
</tr>
<tr>
<td>Brenden Wagner</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>18</td>
<td>2011/06/07</td>
<td>$3,750</td>
</tr>
<tr>
<td>Ebony Grimes</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>48</td>
<td>2010/03/11</td>
<td>$2,875</td>
</tr>
<tr>
<td>Russell Chavez</td>
<td>Director</td>
<td>Edinburgh</td>
<td>20</td>
<td>2011/08/14</td>
<td>$3,600</td>
</tr>
<tr>
<td>Michelle House</td>
<td>Integration Specialist</td>
<td>Edinburgh</td>
<td>37</td>
<td>2011/06/02</td>
<td>$3,750</td>
</tr>
<tr>
<td>Suki Burks</td>
<td>Developer</td>
<td>London</td>
<td>53</td>
<td>2009/10/22</td>
<td>$2,875</td>
</tr>
<tr>
<td>Prescott Bartlett</td>
<td>Technical Author</td>
<td>London</td>
<td>27</td>
<td>2011/05/07</td>
<td>$6,730</td>
</tr>
<tr>
<td>Gavin Cortez</td>
<td>Technical Author</td>
<td>San Francisco</td>
<td>22</td>
<td>2008/10/26</td>
<td>$6,730</td>
</tr>
<tr>
<td>Martena Mccray</td>
<td>Integration Specialist</td>
<td>Edinburgh</td>
<td>46</td>
<td>2011/03/09</td>
<td>$4,080</td>
</tr>
<tr>
<td>Unity Butler</td>
<td>Senior Marketing Designer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/12/09</td>
<td>$3,750</td>
</tr>
<tr>
<td>Howard Hatfield</td>
<td>Financial Controller</td>
<td>San Francisco</td>
<td>51</td>
<td>2008/12/16</td>
<td>$4,080</td>
</tr>
<tr>
<td>Hope Fuentes</td>
<td>Financial Controller</td>
<td>San Francisco</td>
<td>41</td>
<td>2010/02/12</td>
<td>$4,200</td>
</tr>
<tr>
<td>Vivian Harrell</td>
<td>System Architect</td>
<td>San Francisco</td>
<td>62</td>
<td>2009/02/14</td>
<td>$4,965</td>
</tr>
<tr>
<td>Timothy Mooney</td>
<td>Financial Controller</td>
<td>London</td>
<td>37</td>
<td>2008/12/11</td>
<td>$4,200</td>
</tr>
<tr>
<td>Jackson Bradshaw</td>
<td>Director</td>
<td>New York</td>
<td>65</td>
<td>2008/09/26</td>
<td>$5,000</td>
</tr>
<tr>
<td>Miriam Weiss</td>
<td>Support Engineer</td>
<td>Edinburgh</td>
<td>64</td>
<td>2011/02/03</td>
<td>$4,965</td>
</tr>
<tr>
<td>Bruno Nash</td>
<td>Software Engineer</td>
<td>London</td>
<td>38</td>
<td>2011/05/03</td>
<td>$4,200</td>
</tr>
<tr>
<td>Odessa Jackson</td>
<td>Support Engineer</td>
<td>Edinburgh</td>
<td>37</td>
<td>2009/08/19</td>
<td>$3,600</td>
</tr>
<tr>
<td>Thor Walton</td>
<td>Developer</td>
<td>New York</td>
<td>61</td>
<td>2013/08/11</td>
<td>$3,600</td>
</tr>
<tr>
<td>Finn Camacho</td>
<td>Support Engineer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/07/07</td>
<td>$4,800</td>
</tr>
<tr>
<td>Elton Baldwin</td>
<td>Data Coordinator</td>
<td>Edinburgh</td>
<td>64</td>
<td>2012/04/09</td>
<td>$6,730</td>
</tr>
<tr>
<td>Zenaida Frank</td>
<td>Software Engineer</td>
<td>New York</td>
<td>63</td>
<td>2010/01/04</td>
<td>$4,800</td>
</tr>
<tr>
<td>Zorita Serrano</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>56</td>
<td>2012/06/01</td>
<td>$5,300</td>
</tr>
<tr>
<td>Jennifer Acosta</td>
<td>Javascript Developer</td>
<td>Edinburgh</td>
<td>43</td>
<td>2013/02/01</td>
<td>$2,875</td>
</tr>
<tr>
<td>Cara Stevens</td>
<td>Sales Assistant</td>
<td>New York</td>
<td>46</td>
<td>2011/12/06</td>
<td>$4,800</td>
</tr>
<tr>
<td>Hermione Butler</td>
<td>Director</td>
<td>London</td>
<td>47</td>
<td>2011/03/21</td>
<td>$4,080</td>
</tr>
<tr>
<td>Lael Greer</td>
<td>Systems Administrator</td>
<td>London</td>
<td>21</td>
<td>2009/02/27</td>
<td>$3,120</td>
</tr>
<tr>
<td>Jonas Alexander</td>
<td>Developer</td>
<td>San Francisco</td>
<td>30</td>
<td>2010/07/14</td>
<td>$5,300</td>
</tr>
<tr>
<td>Shad Decker</td>
<td>Regional Director</td>
<td>Edinburgh</td>
<td>51</td>
<td>2008/11/13</td>
<td>$5,300</td>
</tr>
<tr>
<td>Michael Bruce</td>
<td>Javascript Developer</td>
<td>Edinburgh</td>
<td>29</td>
<td>2011/06/27</td>
<td>$4,080</td>
</tr>
<tr>
<td>Donna Snider</td>
<td>System Architect</td>
<td>New York</td>
<td>27</td>
<td>2011/01/25</td>
<td>$3,120</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
/* General */
:root {
-green: #4E8A10;
-green: rgba(78, 138, 16, 0.3);
-green: #C6DBAC;
}
body {
background-color: var(-green);
}
h2 {
font-weight: bold;
color: var(-green);
}
.centered-content {
display: inline-block;
text-align: center;
}
#hover-content {
position: absolute;
height: fit-content;
border: 1px solid var(-green);
padding: 1px;
z-index: 1000;
box-shadow: 0 0 10px var(-green);
}
#help-icon {
float: right;
}
.txt-warning {
color: red;
font-size: xx-large;
}
/* Tables */
table {
border: 1px solid black;
border-spacing: 0;
}
table #summary {
width: auto;
}
th, td {
border: 1px solid black;
}
.total {
color: blue;
}
.fileName {
font-weight: bold;
}
.add {
color: green;
}
.del {
color: red;
}
.mod {
color: blue;
}
thead tr {
background-color: var(-green);
}
th {
color: var(-green);
position: relative;
user-select: none;
user-select: none;
}
/* Para DataTables */
th, td {
text-align: left;
}
thead input {
width: 100%;
padding: 3px;
box-sizing: border-box;
background-color: var(-green);
}
div.dt-container {
color: var(-green);
width: fit-content;
}
div.dt-container .dt-paging .dt-paging-button.disabled {
color: var(-green) !important;
}
div.dt-container .dt-paging .dt-paging-button:hover {
border: 1px solid var(-green);
color: var(-green) !important;
background-color: var(-green);
background:gradient(linear, left top, left bottom, color-stop(0%, #66B616), color-stop(100%, #335B0B));
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(to bottom, #66B616 0%, #335B0B 100%);
}
/* Para congelar los encabezados */
.frozen-header {
position: relative;
overflow: auto;
max-height: 300px;
}
.frozen-header table {
table-layout: fixed;
}
.frozen-header thead {
position: sticky;
top: 0;
z-index: 10;
}
/* Acordeón */
.collapsable {
display: none;
}
.zone-group {
margin: 20px 0;
border: 2px solid var(-green);
}
.zone-heading {
display: flex;
align-items: center;
justify-content: space-between;
background-color: var(-green);
color: var(-green);
}
.zone-heading button {
font-family: monospace;
}
.zone-heading span {
flex: 1;
text-align: center;
}
hr {
height: 2px;
background-color: var(-green);
margin: 20px 0;
}
/* Buttons */
button {
border: 1px solid var(-green);
color: var(-green);
background-color: var(-green);
background:gradient(linear, left top, left bottom, color-stop(0%, #66B616), color-stop(100%, #335B0B));
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(top, #66B616 0%, #335B0B 100%);
background:linear-gradient(to bottom, #66B616 0%, #335B0B 100%);
}
.button-row {
justify-content: left;
margin: 5px;
}
.button-row button {
margin: 0 2px;
}
#navigation-bar {
display: flex;
margin-top: 12px;
justify-content: center;
}
/* Blinking */
@keyframes blinking {
0%, 49.9% {visibility: visible;}
50%, 100% {visibility: hidden;}
}
.important-button {
border: 1px solid red;
color: white;
background-color: red;
background:gradient(linear, left top, left bottom, color-stop(0%, #F33), color-stop(100%, #C00));
background:linear-gradient(top, #F33 0%, #C00 100%);
background:linear-gradient(top, #F33 0%, #C00 100%);
background:linear-gradient(top, #F33 0%, #C00 100%);
background:linear-gradient(top, #F33 0%, #C00 100%);
background:linear-gradient(to bottom, #F33 0%, #C00 100%);
}
.warning {
font-size: 120%;
color: red;
vertical-align: middle;
animation: blinking 1s infinite;
}
.arrow {
position: absolute;
top: 0;
right: 0;
color: blue;
}
/* Progress bar */
.progress-container {
width: 100%;
background-color: #f3f3f3;
border-radius: 25px;
overflow: hidden;
}
.progress-bar {
height: 30px;
text-align: center;
line-height: 30px;
color: var(-green);
text-shadow: 1px 1px var(-green);
border-radius: 25px 0 0 25px;
transition: width 0.3s;
}
/* Popup de ayuda */
#overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5); /* Semitransparente */
z-index: 999;
}
#popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: auto;
padding: 20px;
color: var(-green);
background-color: rgba(0.5, 0.5, 0.5, 0.3);
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
z-index: 1000;
}
#popup table {
border-collapse: collapse;
border: none;
}
#popup table td {
border: none;
}
/* Tooltip */
.tooltip {
position: absolute;
background-color: #333;
color: #fff;
padding: 5px 10px;
border-radius: 4px;
font-size: 14px;
white-space: nowrap;
z-index: 1000;
display: none;
}
.tooltip-show {
display: block;
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
$(function() {
setupDatatable();
setupKeyboardEvents();
});
function setupDatatable() {
$('#datatable').DataTable({
orderCellsTop: true,
colReorder: true,
order: [],
pageLength: 25,
search: {
regex: true,
smart: false,
},
language: {
sProcessing: "Procesando...",
sLengthMenu: "Mostrar _MENU_ registros",
sZeroRecords: "No se han encontrado resultados",
sEmptyTable: "No hay ningún dato disponible en esta tabla",
sInfo: "Mostrando registros del _START_ al _END_ de un total de _TOTAL_",
sInfoEmpty: "Mostrando registros del 0 al 0 de un total de 0 registros",
sInfoFiltered: "(filtrado de un total de _MAX_ registros)",
sInfoPostFix: "",
sSearch: "Buscar:",
sUrl: "",
sInfoThousands: ".",
sLoadingRecords: "Cargando...",
oPaginate: {
sFirst: "Primero",
sLast: "Último",
sNext: "Siguiente",
sPrevious: "Anterior"
},
oAria: {
sSortAscending: ": Activar para ordenar la columna de manera ascendente",
sSortDescending: ": Activar para ordenar la columna de manera descendente"
}
},
initComplete: function () {
this.api()
.columns()
.every(function () {
let column = this;
let cell = column.header(1);
let input = document.createElement('input');
input.placeholder = cell.textContent;
cell.querySelector(".dt-column-title").replaceChildren(input);
input.addEventListener('keyup', () => {
if (column.search() !== this.value) {
column.search(input.value, true, false).draw();
}
});
});
},
});
}
function setupKeyboardEvents() {
$(document).on('keydown', function(e) {
if (e.keyCode === 27) {
$('#btn-close').click();
}
});
}
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. |