JSFiddle - React, Tailwind, and code Playground
by Justin Lee
HTML
<script src="http://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
<script src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.9/js/dataTables.jqueryui.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css">
<form id="requestForm" method="POST">
<div id='test'>Inspector Status</div>
<button type="button" id="search" value="Search" title="Search" onclick="searchInspectionListSubmit()"></button>
<table id="listing" class="display" cellspacing="0" width="100%"></table>
</form>
CSS
/*displaytag.css */
body{
background-color: #FBEAF9;
margin-bottom: 0;
margin-top: 0;
font-family: Verdana;
font-size: 10px;
color: #000000;
}
h1 {
font-family: Avert-bold;
font-size: 16px;
color: #000000;
}
a, a:visited, a:hover {
color:#000000;
font-family: Verdana, Geneva;
font-size: 1.3em;
text-decoration:underline
}
a:hover {
text-decoration: underline;
color:#000000;
}
img{
border:none;
}
table {
border: 0;
width: 100%;
border-collapse: collapse;
margin-bottom: 10px;
}
th, td {
text-align: left;
vertical-align: top;
font-family: Verdana, Geneva;
font-size: 10;
padding-bottom: 5px;
}
input, select, td, textarea{
font-family:Verdana, Geneva;
font-size:10px;
}
input {
border-style: solid;
border-color: #D9D0A9;
border-bottom-width: 1px;
border-top-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
}
input.fieldDisplayTagReadonly {
border: 0;
background-color: #F1E7B2;
}
input.fieldReadonly {
border: 0;
background-color: #F6F1D3;
}
input.fieldReadonlyWhiteBackground {
border: 0;
background-color: #FFFFFF;
}
.radioStyle {
font-family:Verdana, Geneva;
font-size:10px;
border: 0;
}
div.exportlinks {
background-color: #D9D0A9;
display: table-cell;
vertical-align: middle;
line-height:20px;
padding-left: 10px;
}
div.exportlinks h2 {
font-family: Verdana, Geneva;
font-size: 10;
}
table.displayTabTable {
/*background-color: #FBEAF9;*/
background-color: #FFFFFF;
border-collapse:collapse;
text-align:left;
width:100%;
margin-bottom: 10px;
}
table.displayTabTable th {
font-family:Verdana, Geneva;
font-size: 10px;
color: #FFFFFF;
background-color: #7222A8;
vertical-align: middle;
height: 20px;
padding-left: 10px;
}
table.displayTabTable td {
font-family:Verdana, Geneva;
font-size: 10px;
}
table.displayTabTable h2 {
font-family:Verdana, Geneva;
font-size:...
JavaScript
function searchInspectionListSubmit() {
var content = "";
content += "<table id=\"listing\" class=\"display\" cellspacing=\"0\" width=\"100%\">";
content += "<thead>";
content += "<tr>";
content += "<th>Status</th>";
content += "<th>Inspector</th>";
content += "</tr>";
content += "</thead>";
content += "<tfoot>";
content += "<tr>";
content += "<th>Status</th>";
content += "<th>Inspector</th>";
content += "</tr>";
content += "</tfoot>";
content += "<tbody>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "John" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Larry" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Amy" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Stacy" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Louis" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Karl" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Manson" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Lee" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Susie" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content += "<td>" + "Zairul" + "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>" + "Outstanding" + "</td>";
content +=...