On a menu, I want to apply slide-toggle or something like that in jQuery where all the children of li are hidden by default. When li is clicked it shows it’s direct children. Showing children of li also hides all other children.
<ul id="navlist">
<li>Information 1<ul>
<li>apple1</li>
<li>Mango1</li>
<li>Banana1</li>
</ul>
</li>
<li>Information 2<ul>
<li>apple2</li>
<li>Mango2</li>
<li>Banana3</li>
</ul>
</li>
<li>Information 3<ul>
<li>apple3</li>
<li>Mango3</li>
<li>Banana3</li>
</ul>
</li>
1 Answer