I waded through a TON of terrible js \"solutions\" for how to simply make collapsible nested list(s).
This is what I eventually came up with.
css:
ul>li>ul { display: none; }
js/jquery
$('li').click(function(e){ e.stopPropagation(); if(this.getElementsByTagName("ul")[0].style.display =="block") $(this).find("ul").slideUp(); else $(this).children(":first").slideDown(); });
jfiddle