Someone has had a dig at this before, but I don't seem to be able to make it work. I'm trying to filter cards on Bootstrap 4 and when I apply a search query, it ends up hiding all my cards, instead of just the ones it should.
Hopefully anyone can help.
$('#search').keyup(function() {
$('.card').show();
var filter = $(this).val(); // get the value of the input, which we filter on
$('.card-deck').find('.card .card-body h4:not(:contains(" + filter + "))').parent().parent().addClass('d-none');
})
Here's the full code: https://jsfiddle.net/8120104x/#&togetherjs=jTm0prUR4S