Binding click to nested ul's
<p>I am parsing a markdown file with nested uls to create an accordion style documentation system where you can click on each element that is followed by a ul and expand to see it's contents.</p>

<p>The structure is roughly:</p>

<pre><code>h4 (click to expand)
  ul
    li (click to expand)
      ul
        li (click to expand)
          ul
</code></pre>

<p>Here's my code:</p>

<pre><code>$('li').each(function(){
  if($(this).children().is('ul')) {
  $(this).addClass('link').bind('click', function(e){
    e.stopPropogation();
    $(this).children('ul').slideToggle();
  }); }
});
</code></pre>

<p>Without stopPropigation() in there when I click on the second li trigger (level 2?) it does expand it's contents but also collapses the parent which, obviously, makes it a moot action. If I use stopProp it kills the function all together.</p>

<p>Thoughts?</p>
