JSFiddle - React, Tailwind, and code Playground
HTML
<div class="col-lg-9 actions">
<label class="mt-checkbox mt-checkbox-outline"><input class="filtermaths" type="checkbox">Show All Maths<span></span></label>
<label class="mt-checkbox mt-checkbox-outline"><input class="filterphysics" type="checkbox">Show All Physics<span></span></label>
<label class="mt-checkbox mt-checkbox-outline"><input class="filterchemistry" type="checkbox">Show All Chemistry<span></span></label>
</div>
<hr>
<div class="sortable col-lg-12" id="pacstable">
<div class="portlet portlet-sortable light bordered pack-panel">
<div class="portlet-title">
<div class="row">
<div class="col-md-7">
<div class="packdtsl">
<div class="packimg"></div>
<ul>
<li>
<span class="title pac_inner">Student Name:</span>
<span>
<h1 class="studentname">Mark</h1>
</span>
</li>
</ul>
</div>
</div>
<div class="col-md-2">
<div class="packrow">
</div>
</div>
<div class="col-md-3">
<div class="packrow">
<ul>
<li><label class="mt-checkbox mt-checkbox-outline"><input class="mathscheckbox" value="maths_flag" type="checkbox" unchecked="">Maths<span></span></label></li>
<li><label class="mt-checkbox mt-checkbox-outline"><input class="physicscheckbox" value="physics_flag" type="checkbox" checked="">Physics<span></span></label></li>
<li><label class="mt-checkbox mt-checkbox-outline"><input class="chemistrycheckbox" value="chemistry_flag" type="checkbox" checked="">Chemistry<span></span></label></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="portlet...
JavaScript
$(document).on('change', '.filtermaths', function() {
$(".pack-panel").each(function () {
var visible = $(this).find('.mathscheckbox').prop('checked')
$(this).toggle(visible);
});
});
$(document).on('change', '.filterphysics', function() {
$(".pack-panel").each(function () {
var visible = $(this).find('.physicscheckbox').prop('checked')
$(this).toggle(visible);
});
});
$(document).on('change', '.filterchemistry', function() {
$(".pack-panel").each(function () {
var visible = $(this).find('.chemistrycheckbox').prop('checked')
$(this).toggle(visible);
});
});