I would like to accomplish the following with jquery :
When I click on this link
<a href="#">Cars</a>
I would like all divs like those
<div class="product">
<div class="category">Cars</div>
</div>
to do something.
You get the idea, I have a menu with a list of categories, and a list of products, each containing a div with the category name, and I would like to make them hide/show.
I am not sure if i fully understand your question, but if you want the div class=”category” cars to appear when cars link is clicked, follow this:
if you want to hide the div just replace
$(item).show(); with$(item).hide();