i am trying to implement Filterizr plugin (https://yiotis.net/filterizr/#/tutorials/quickstart) on my project, and i need exactly mix filter as presented on this tutorial page https://yiotis.net/filterizr/#/tutorials/filtering
if click on mix button as shown on screenshots, we see only orange and purple blocks - this is what exactly I needed, but it is not working.
I build my own demo using that plugin, but still not working.
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/filterizr/2.2.4/jquery.filterizr.min.js"></script>
<title>Hello, world!</title>
</head>
<body>
<h1>filter</h1>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<div class="container">
<div style="cursor:pointer;" class="col-md-12 col-xs-12">
<ul>
<li data-filter="all">All</li>
<li data-filter="1">1</li>
<li data-filter="2">2</li>
<li data-filter="1,2">1 and 2</li>
</ul>
</div>
</div>
<h1>items</h1>
<div style="margin: 40px;" class="row filtr-container">
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-category="all,1">
<span>1</span>
</div>
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-category="all,2">
<span>2</span>
</div>
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-category="all">
<span>3</span>
</div>
</div>
<script>
$('.filtr-container').filterizr({});
</script>
</body>
</html>
if click on "1 and 2" filter - expected to see 1 and 2 items, as in example on this https://yiotis.net/filterizr/#/tutorials/filtering - Mix , but not working. I am stuck, need some advice.
Looks like i found the solution =) - migration on Shuffle.js (https://vestride.github.io/Shuffle/faq)
for this plugin it's works fine, and looks like it's free for commercial use.
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Shuffle/5.4.1/shuffle.min.js" integrity="sha512-26vtWkj1Yt/eY2Ykb7TO/RzzysOKS7zaD/055jS+2IW4DX89qlH/HziTFqfzMLAxpFVpYhPWgTdCcavzf8Qs8g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<title>Hello, world!</title>
</head>
<style>
#grid {margin-left:-5px;margin-right:-5px;position:relative; overflow: hidden;}
#grid [class*="col-"] {padding:5px;}
@media (max-width:320px) {
#grid [class*="col-"] {width:100%;}
}
.shuffle_sizer {
position: absolute;
opacity: 0;
visibility: hidden;
}
</style>
<body>
<h1>filter</h1>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<div class="container">
<div style="cursor:pointer;" class="col-md-12 col-xs-12 filter-options">
<ul class>
<li data-group='["all"]'>All</li>
<li data-group='["1"]'>1</li>
<li data-group='["2"]'>2</li>
<li data-group='["1","2","prem"]'>1 and 2 and prem</li>
</ul>
</div>
</div>
<h1>items</h1>
<div style="margin: 40px;" id="grid" class="row">
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-groups='["all","1"]'>
<span>1</span>
</div>
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-groups='["all","2"]'>
<span>2</span>
</div>
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-groups='["all"]'>
<span>3</span>
</div>
<div style="border: 4px black;" class="col-md-2 col-sm-6 filtr-item" data-groups='["all","prem"]'>
<span>prem</span>
</div>
<!-- sizer -->
<div class="col-xs-6 col-sm-4 col-md-3 shuffle_sizer"></div>
</div>
<script>
var Shuffle = window.Shuffle;
var $grid = $('#grid');
var sizer = $grid.find('.shuffle_sizer');
var shuffleInstance = new Shuffle($grid, {
itemSelector: '.filtr-item',
sizer: sizer // could also be a selector: '.shuffle_sizer'
});
$('.filter-options').on('click','li',function(){
let currFilterName = $(this).data('group');
shuffleInstance.filter(currFilterName);
});
</script>
</body>
</html>