Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [JavaScript] how to create a navigation drop down menu but on click?
#1
Not Solved
I think this can be done with javascript but because i dont know i would like to ask your help..

That i want is when someone clicks the nav to show up the drop down but on click and not in hover..

Here is the code i hope you can help me out.

Html:

<nav>
	<ul>
	
		<li><a href="#">Nav</a>
			<ul>
				<li><a href="#">Drop Menu 1</a></li>
				<li><a href="#">Drop Menu 2</a>
					</li>
	</ul>
</nav>

CSS:
nav ul ul {
	display: none;
}

	nav ul li:hover > ul {
		display: block;
	}


	nav ul {
 
	list-style: none;
	position: relative;
	display: inline-table;
}
	nav ul:after {
		content: ""; clear: both; display: block;
	}

thanks for any kind of help.I dont know if is the right section to post it...but i was just looking for help;p
#2
Not Solved
see Google search results for such menu codes
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)