You need to pass the current object as context in the selector to get the element related to event source object. You also need to use class instead of id
or generate unique ids for div with id = single-toggle as html elements are supposed
to have unique ids.
I have give the div with id a class="single-toggle"
Change
$("div.invisible-when-folded").toggle();
To
$("div.invisible-when-folded", this).toggle();
You code
$(function(){
$("#single-toggle").click(
function(){ $("div.invisible-when-folded", this).toggle(); } );
});