Jump to content

check id of div and don't allow show if same id of other displayed


hoshiii

Recommended Posts

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.

 

 
ps: sorry my bad english !

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.