Issue: I am facing a problem where nothing happens when I click the menu on the HTML page. It seems like a total beginner mistake, but I can't seem to get it to work. I have checked the code, and alert works fine, indicating that jQuery is connected to the HTML file. However, the animate function is not working at all.
Below is the jQuery and HTML code:
<div class="fgg">
<ul>
<li><a href="home.html">Home</a></li>
<li><a href="product.html">Product</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<id class="button">Menu</id>
<script>
$('#button').click(function({$(".fgg").animate({down:'+=400px'})});
</script>
</div>
And here is the CSS code:
.fgg {
font-family: "Courier New", Courier, monospace;
font-size: 20px;
text-decoration: none;
padding-left: 200px;
border-style: solid;
border-color: black;
position: relative;
}
#button {
font-family: "Courier New", Courier, monospace;
font-size: 35px;
border-style: solid;
border-color: black;
position: relative;
}
Apologies for any confusion, I am just starting out and still trying to figure out how to format code properly.