Try this instead:
$('.item h3 a').click(function () { $(this).parent().next().toggleClass("display"); });
Demo is here .
What your current selector does is select all the elements that match. What the above snippet does is select the element with respect to the one that was pressed using $(this) , which in this case was pressed <a> .
Since <a> is inside <h3> and <div> is the brother of <h3> , not <a> , you need to use $.parent() to select <h3> , then use $.next() to get the next element after <h3> , which is the <div> that you want to switch.
The best way to do this is to attach a click handler to <h3> . This simplifies the selector chain and also fixes any problems that may occur with the <a> tag. This will work better IMO:
$('.item h3').click(function () { $(this).next().toggleClass("display"); });
Bojangles
source share