0

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

Edited by Martin C++: n/a

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by ckchaudhary
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.