Hi AleMonteiro and thank you for your answer, :))
Sorry to answer you late but i take another path. :/
I did a new jquery function, it works half.
For example, if i select '14', all <div id="categorie" cat="14"> will be displayed and the box associated will be displayed and the other div without "cat 14" will not be displayed.
The problem is if i select '5', the <div id="categorie" cat="5"> and the box associated will not be display.
I'm explaining more, in this code:
<div id="box">
<div id="categorie" cat="14" catsort="Yes">
...
</div>
<div id="categorie" cat="5" catsort="No">
...
</div>
<div id="categorie" cat="14" catsort="Yes">
...
</div>
</div>
Here my jquery function doesn't display the first '<div id="categorie" cat="14" catsort="Yes"></div>' only the last div
Perhaps an idea?
Thanks a lot for your help :)
This is my new jquery function:
$(function(){
$('ul#groupCat li').click(function(){
var catChoice=$(this).attr('cat');
if(catChoice == "00"){
$("#subMain #archivesResult_Content #box").slideDown();
$("#subMain #archivesResult_Content #box #categorie").slideDown();
$("#subMain #archivesResult_Content #box #categorie").removeAttr('catsort');
return;
}
var i=0;
$("#subMain #archivesResult_Content #box #categorie").each(function(){
if($(this).attr("cat") != catChoice){
$(this).slideUp();
$(this).attr('catsort','No');
}else{
i++;
$(this).slideDown();
$(this).attr('catsort','Yes');
}
var catSortAttr=$(this).attr('catsort');;
if(catSortAttr=="Yes"){
$(this).parent().slideDown();
}else{
$(this).parent().slideUp();
}
});
});
});