I am looking to enhance my filtering system by allowing users to apply and view multiple filters simultaneously. For example, I want to be able to select 'High' and 'pizza' filters and see the results that match both criteria. Currently, the system only allows for switching between filters and displaying results based on the single filter selected.
https://jsfiddle.net/f7srx0dd/
<div class="nav">
<a href="#" data-category-type="high">high</a>
<a href="#" data-category-type="low" data-category-name="air">low</a>
<a href="#" data-category-name="pizza">pizza</a>
</div>
<div id="Categories">
<div class="hide" data-category-type="high" data-category- name="pizza">high</div>
<div class="hide" data-category-type="low" data-category-name="pasta">low</div>
<div class="hide" data-category-type="low" data-category-name="pizza">low</div>
<div class="hide" data-category-type="high" data-category-name="pasta">high</div>
</div>
$('.nav a').on('click', function (e) {
e.preventDefault();
var cat = $(this).data('categoryType');
var nam = $(this).data('categoryName');
$('#Categories > div').hide();
$('#Categories > div[data-category-type="'+cat+'"]').show();
$('#Categories > div[data-category-name="'+nam+'"]').show();
});