Hello,
How can I make a menu for the following code
<div id="sidebar">
<ul>
<li><a href="#">Master link</a>
<ul>
<li><a href="#">Link to be revealed</a></li>
</ul>
</li>
<li><a href="">Master Link 2</a>
<ul>
<li><a href="#">Sublink</a></li>
</ul>
</ul>
</div>
Wit this CSS, I m hiding the second level of the menu, that is ul > ul
#sidebar ul li {list-style:none;}
#sidebar ul li ul {position:relative;left:20px;display:none;}
When I click on "master link" then I want all the subitems to be revealed and when clicked again then hide. I m really noob at javascript, so I dont even know what to look from google.
Thanks in advance