I'm having some difficulty getting my navigation menu to show up when I click the navigation menu icon.
HTML
nav role="navigation" class="navbar">
<div class="nav-header">
<a href="#"><span style="font-family: 'Cabin Sketch', cursive; font-size: 1.4em;">Testy Testy Web</span></a>
<a href="#menu" id="toggle"><span><i class="fa fa-bars"></i></span></a>
</div>
<div id="menu">
<ul>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#pricing">Pricing</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
</nav>
CSS
nav {width: 100%; position: fixed; text-align: left; background-color: #404040; z-index: 999;}
nav ul li {display: inline;}
nav a {text-decoration: none; float: left; color: white; padding: 1em; line-height: 100%;}
nav a:hover {background-color: #1AA2D4;}
.nav-header a {display: inline-block;}
#toggle {float: right; display: none;}
@media (max-width: 592px) {
.splash p {font-size: 1em;}
.splash h1 {font-size: 8em;}
nav {width: 100%; position: fixed; top: 0; text-align: left; background-color: #404040; z-index: 999;}
nav ul li {display: block; float: left; clear: left; width: 100%; clear: bottom;}
nav ul {width: 100%;}
nav a {text-decoration: none; float: left; color: white; padding: 1em; line-height: 100%;}
#toggle {float: right; display: block;}
#menu {display: none;}
JavaScript/jQuery
$(document).ready(function(){
$('#toggle').click(function(){
$('#menu').css('display', 'visible');
});
});
Essentially, I've set up the navigation links to be hidden on smaller screens, but I'm struggling with implementing jQuery to make them visible when the toggle icon is clicked. I know this functionality is common in Bootstrap, but I'm not using a framework for the website I'm working on.
If anyone can point out where I might be going wrong, I'd really appreciate it.
Thank you