JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<h3><input id="nextColor" type="color" value="#9ac99d"> Parameters:</h3>
<div>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="checkbox" name="SelectAll" class="all" />All</label><label>
<input type="checkbox" name="5" class="selector" />5</label><label>
<input type="checkbox" name="7" class="selector" />7</label><label>
<input type="checkbox" name="9" class="selector" />9</label><label>
<input type="checkbox" name="10" class="selector" />10</label><label>
<input type="checkbox" name="19" class="selector" />19</label><label>
<input type="checkbox" name="23" class="selector" />23</label><label>
<input type="checkbox" name="35" class="selector" />35</label><label>
<input type="checkbox" name="37" class="selector" />37</label><label>
<input type="checkbox" name="40" class="selector" />40</label><label>
<input type="checkbox" name="43" class="selector" />43</label><label>
<input type="checkbox" name="44" class="selector" />44</label><label>
<input type="checkbox" name="46" class="selector" />46</label><label>
<input type="checkbox" name="51" class="selector" />51</label><label>
<input type="checkbox" name="52" class="selector" />52</label><label>
<input type="checkbox" name="54" class="selector" />54</label><label>
<input type="checkbox" name="55" class="selector" />55</label><label>
<input type="checkbox" name="60" class="selector" />60</label><label>
<input type="checkbox" name="61" class="selector" />61</label><label>
<input type="checkbox"...
CSS
@charset "utf-8";
/* CSS Document */
*
{
margin: 3;
padding: 3;
}
html, body, .Container
{
height: 98%;
}
.Container:before
{
content: '';
height: 100%;
float: left;
}
.Header
{
margin-bottom: 10px;
background-color: #fff;
}
.Content
{
position: relative;
z-index: 1;
}
.Content:after
{
content: '';
clear: both;
display: block;
}
.Wrapper
{
position: absolute;
width: 500px;
height: 100%;
}
.Wrapper > div
{
height: 100%;
}
.LeftContent
{
background-color: white;
overflow: auto;
width: 600px;
}
.mainContent
{
background-color: white;
margin-left: 800px;
}
.selector {
display: none;
}
tr.border_bottom td {
border-bottom:1pt solid black;
}
table.tableizer-table {
border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
border-collapse:collapse; /* Keeps the table lines like in excel */
table-layout:fixed; /* Fits the table in the screen */
}
.tableizer-table td {
padding: 6px;
margin: 6px;
border: 2px solid #ccc;
}
.tableizer-table th {
background-color: #FFFFFF;
color: #FFF;
font-weight: bold;
}
JavaScript
// JavaScript Document
$(document).ready(function() {
$('.selector').each(function() {
$(this).on('click', check);
});
$('.all').each(function() {
$(this).on('click', all);
});
function all(event) {
if($(this).is(':checked')){ $("input:checkbox:not(:checked)",$(this).parents('form')).not(this).prop("checked","checked");
} else {
$("input:checkbox(:checked)",$(this).parents('form')).not(this).prop("checked","");
}
//$('.selector').prop("checked", this.name === "SelectAll");
check(event);
}
function check(event) {
var checked = $(".selector:checked").map(function () {
return this.name
}).get()
$('td').css('background', '#fff').filter(function () {
return $.inArray($(this).text(), checked) >= 0
}).css('background', $('#nextColor').val())
if ($(this).is(".selector"))
$('.all').not(this).prop("checked", false)
}
$( "#Hidden").on( "click", function() {
$(".selector").toggle();
});
});