Got this code:
<ul>something
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
What I want to achieve is when I click on UL text element(something) whole UL is toggle. When I click on an LI element - only this specific LI element is toggle. I guess I need to modify my code to:
<ul class="whole">something
<li>
<ul>one
<li class="li one">one</li>
</ul>
<ul>two
<li class="li two">two</li>
</ul>
<ul>three
<li class="li three">three</li>
</ul>
</li>
</ul>
So I can clink on something (text) to toggle the LI (one,two,three). But how to reconcile toggle whole UL on click with toggling LI?
jQuery code so far:
$(".whole").click(function()
{
$(".li").slideToggle();
});
What should the rest of the jQ code looks like?