No, this is not a straight forward toggle question. I am aware of the toggle() functions and how to simply hide/show a div. Imagine a box with a label inside:
$('.section-legend').live('click',function(){
$(this).parent().toggleClass('hidden');
});
This is assuming the section-legend is just as large as it's container in 'hidden state'.
EDIT: changed some code, solution is this:
$('.section').live('click',function(){
$(this).removeClass('hidden');
});
$('.section-legend').live('click',function(){
$(this).parent().toggleClass('hidden'); return false;
});
return false
did the trick!
demo: http://jsfiddle.net/RUfN7/2/