I have this code:
checkbox : function(elem) {
$(function() {
var isChecked = elem.checked,
$check = $(this).val(),
$address = $('.'+ elem.id);
$image = $('.imagenone');
if(isChecked) {
$address.stop().fadeIn("slow").css("display","inline-block");
$image.stop().fadeOut("slow").css("display","none");
} else {
$address.stop().fadeOut("slow");
}
});
}
I need check if id of "$address"(class) displayed, not display other div with same id.
I have a "query" which lists all the "rows" of the table, each "row" has a sub-category and associated product, which in my case the sub-category is the class and id is the product. but for different sub-categories can have the same product, not wanting to give the same id / product appear in duplicate.
the problem is that there are only checkboxes for sub-categories, where the purpose is to create a filter. where all products with this sub-category, choosing more than one sub-category to check the sub-category appear. In different sub-category may contain the same products, just wanting to appear only once, and not repeated, ie not appear divs with the same id (same product) in duplicate.
Structure Product List - http://s30.postimg.org/p0j37jl01/coding.jpg
ps: sorry my bad english !