JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css">
<script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
<h1>
Search Tables</h1>
<!--***MAIN CONTENT***-->
<div id="main-content">
<div>
<h1 class="entry-title">
</h1>
<div class="entry-content">
<span id="lblSourceUrl"></span><span id="MainPlaceHolder_BodyContent_MessageLabel"
style="color: Red;"></span>
<hr />
<div class="expandablerows">
<hr />
<h3>
College/Department Specific Scholarships</h3>
<div>
<h2>
College of Arts & Science
</h2>
<div id='collegeDepartmentList2'>
<div>
<h3 id='departmentTitle232'>
<span id="MainPlaceHolder_BodyContent_CollegeList_collegeDepartmentListDisplay_0_departmentList_0_deptName_0"
style="display: inline-block; width: 95%; font-weight: bold;">Dept of Biological
Sciences</span>
</h3>
<div>
<div id='_templatesDiv2' style="display: block;">
<div id="MainPlaceHolder_BodyContent_CollegeList_collegeDepartmentListDisplay_0_departmentList_0_ctl00_0_scholarshipApplTemplates_0">
<table id='MainPlaceHolder_BodyContent_CollegeList_collegeDepartmentListDisplay_0_departmentList_0_ctl00_0_scholarshipApplTemplates_0232_datatable'
width="100%">
<thead>
<tr>
<th>
Scholarship Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
...
CSS
/* @group Search Bar */
/* Search Bar */
#searchbar {
float: right;
line-height: 0;
margin-left: 10px;
margin-top: -8px;
position: relative;
}
.page-template-template-home-php #searchbar {
margin-top: 0px;
}
#searchform label {
display: none;
}
#searchbar #s {
background: rgba(0, 0, 0, .2);
border: none;
padding: 3px 10px;
margin: 0;
width: 173px;
height: 23px;
-moz-box-shadow: inset 0 0 5px #000;
box-shadow:inset 0 0 5px #000;
border-radius: 11px;
color: #fff;
font-size: 10px;
}
#searchbar #searchsubmit {
position: absolute;
top: 0;
right: 0;
background: none;
border: none;
text-shadow: none;
color: #fff;
width: 23px;
height: 23px;
text-indent: -999px;
cursor: pointer;
overflow: hidden;
margin-right: 3px;
background: url(../images/icons/search.png) 0 5px no-repeat;
}
.page-template-template-home-php #search_toggle {
display: none;
}
.page-template-template-home-php #search_toggle {
display: none;
}
#search_toggle {
height:16px;
width:100%;
margin:5px 0 0 0;
}
#search_toggle .search_check {
height:13px;
width:12px;
padding:0 2px 0 0;
top:0;
background:url(../images/layout/checkbox.png) no-repeat 0 0;
display: inline-block;
margin: 2px 2px 0 0px;
float:left;
}
#search_toggle .search_check.active {
background-position:0 -13px;
}
#search_toggle label {
display: inline-block;
font-size: 8px;
font-weight: normal;
text-transform: uppercase;
color:#909fb4;
margin: 8px 5px 0 0;
float:left;
}
#search_toggle label.section_search {
margin-right: 0;
}
/* @end */
/* @group Header */
#header {
width:220px;
float: left;
display: inline;
margin-left: 15px;
margin-right: 15px;
}
/* @end */
/* @group Navigation */
#navigation {
width: 700px;
margin: 18px 0 0 0;
float: left;
display: inline;
}
#navigation ul#menu-top-menu,...
JavaScript
function buildSearchResultsDataTable(recordCount, recordsPerPage, aidYearId, elementId) {
var isPageSizeValid = recordsPerPage > 0;
var isCurrentAidYearIdValid = aidYearId > 0;
var dataTable = null;
if (isPageSizeValid === true && isCurrentAidYearIdValid === true) {
var oLanguageContent = "";
if (recordCount > recordsPerPage) {
oLanguageContent = "Search for a Template:";
} else {
oLanguageContent = false;
}
$('#' + elementId).dataTable({
"oLanguage": {
"sSearch": oLanguageContent,
"sZeroRecords": "No scholarship application templates are available for this college or department."
},
"bLengthChange": false,
"iDisplayLength": recordsPerPage,
"sPaginationType": "two_button",
"bInfo": true,
"bProcessing": true,
"aaSorting": [
[0, "asc"]
]
});
}
}
function ToggleDisplay(prefix, id) {
var elem = document.getElementById(prefix + id);
if (elem) {
if (elem.style.display != 'block') {
elem.style.display = 'block';
elem.style.visibility = 'visible';
} else {
elem.style.display = 'none';
elem.style.visibility = 'hidden';
}
}
}
$(document).ready(function () {
$(function () {
var pageSize = 10;
var currentAidYear = 5;
var elem = null;
/* table #2 */
templatesCount = 8;
tableId = 'MainPlaceHolder_BodyContent_CollegeList_collegeDepartmentListDisplay_0_departmentList_0_ctl00_0_scholarshipApplTemplates_0232_datatable';
templatesDivId = '_templatesDiv2';
//this.buildSearchResultsDataTable(templatesCount, pageSize, currentAidYear, tableId);
var isPageSizeValid = pageSize > 0;
var isCurrentAidYearIdValid = currentAidYear > 0;
var...