Hi :)
I don' know how to hide some div with special class.
This is my html code:
<div id="subMain">
<div id="archivesResult_Content">
<div id="box">
<div id="categorie" cat="2">
...
</div>
</div>
<div id="box">
<div id="categorie" cat="14">
...
</div>
<div id="categorie" cat="5">
...
</div>
<div id="categorie" cat="14">
...
</div>
</div>
<div id="box">
<div id="categorie" cat="13">
...
</div>
</div>
</div>
</div>
This is my jquery code:
$(function(){
$('ul#groupCat li').click(function(){
var catChoice=$(this).attr('cat');
if(catChoice == "00"){
$("#subMain #archivesResult_Content #box #categorie").slideDown();
return;
}
var i=0;
$("#subMain #archivesResult_Content #box #categorie").each(function(){
if($(this).attr("cat") != catChoice){
$(this).slideUp();
}else{
i++;
$(this).slideDown();
}
});
});
});
The problem is:
For example, if an user clicks on cat '14', all div different of '14' will disappear but not the box associated. In this example, the box with '<div id="categorie" cat="2">' will still display without '<div id="categorie" cat="2">'. That i would like that this box with the '<div id="categorie" cat="2">' disappear.
I hope i was clear ;)
Thanks a lot for your help :)