I need to be able to filter some divs.
I would like to be able to click a link and use the links value to decide which divs should show and then hide the others.
So far I've got the following but it is not working:
$('.catLink').click(function() {
var filterCat = $(this).val();
$('.single_product_display').each(function(index) {
$(this).not('div[class="'+filterName+'"]"').hide();
});
});
This code successfully hide them all:
$('.catLink').click(function() {
var filterCat = $(this).val();
$('.single_product_display').each(function(index) {
$(this).hide();
});
});
I just need to figure out how to pass in the links value and use that to show those by the class name.
can anyone help?