I assume you're looking for something like this
$('ul li ul').hide();
$('.header > * > a, .foldercontent > * > a').click(function () {
$(this).parent().siblings().slideToggle("slow");
});
You could also use margin:0; padding:0;
to prevent the jumping instead of overflow:hidden
, but that's up to you
Also note that you don't need the <a>
tags, you could apply them to just the headers themselves if you'd like to