I am fairly new to the world of javascript and jQuery and I'm encountering some issues that are proving difficult to troubleshoot. I am experimenting with the .toggle function on a menu list, but when I click the temporary button I've set up for toggling, nothing seems to be happening.
Here is my code:
$(document).ready(function() {
$("#menuIcon").click(function() {
$("#menu").fadeIn(1000);
});
});
#menuIcon {
display: none;
}
@media screen and (max-width: 1000px) {
#menu {
display: none;
}
#menuIcon {
display: block;
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="menuIcon">Click Me</button>
<div id="menu">
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Page</li>
<li>Contact</li>
</ul>
</nav>
</div>