Help needed with creating a drop-down menu on my small website. Having trouble getting the desired slideDown effect to work, even though other animations are functioning fine. The text on the div reads "Menu".
Below is the jQuery code:
$(document).ready(function(){
$("#menu").click(function(){
$("#menu").moveDown(40px);
});
});
Here's the CSS:
body {
background-color:white;
}
#header {
width:1024px;
height:100px;
margin-top:-25px;
border:2px solid black;
border-radius:20px;
background-color:lightblue;
margin-bottom:10px;
margin-left:auto;
margin-right:auto;
}
#menu {
position:relative;
height:400px;
width:200px;
background-color:blue;
border:2px solid black;
border-radius:15px;
margin-left:850px;
margin-top:-345px;
text-align:center;
}
#menuText {
margin-top:360px;
font-family:Verdana;
font-size:30px;
font-weight:bold;
}
#heading {
font-family:Verdana;
text-align:center;
margin-top:35px;
}
#myCanvas {
background-color:white;
}
canvas {
display:block;
margin:2px;
}
#body {
height:768px;
width:1024px;
margin-left:auto;
margin-right:auto;
border: 2px solid black;
border-radius:20px;
background-color:lightblue;
And here's the HTML:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="Document2.js"></script>
<link rel="stylesheet" type="text/css" href="Document1.css">
<title>Page Title</title>
</head>
<body>
<div id="menu">
<p id="menuText">Menu</p>
</div>
<div id="header">
<h1 id="heading">Hello There!</h1>
</div>
<div id="body">
<p>This is a line on my website.</p>
<p>This is another line on my website.</p>
<p>I want to make a game like Super Mario.</p>
<p>I alo want to make a Brick Breaker game.</p>
<h3>Below is an unfinished American Flag.</h3>
<p>The dimensions of the flag are exact. All the flag needs is some stars.</p>
<canvas id="myCanvas" width="190" height="100" style="border:2px solid black"> </canvas>
<canvas id="circle" width="500" height="250" style="border:2px solid black"> </canvas>
<p id="date"> </p>
</div>
<script src="Document1.js"></script>
</body>
</html>
In addition to this, I have a JavaScript document for drawing images on canvas. As an amateur, I'd appreciate simple explanations or solutions. Thank you for your time and any assistance provided.