I'm trying to hide and show the contact form (using display:"none" and display:"block") when clicking the button "click me!". I've tried multiple javascript and jquery examples but none of them seem to work for me. It would be nice if the form would slide in and out under the click me button.
Can someone help me?
Visit this link to see my code http://jsfiddle.net/jm2o73f2/9/
function myFunction() {
var x = document.getElementById("hidden");
x.style.
}
body, img, ul, li, div, input, textarea {
margin:0;
padding:0;
}
#footer {
width:100%;
background:#CCC;
clear:both;
margin-bottom:-20px;
}
#footer img {
cursor:pointer;
}
#footer ul {
list-style:none;
width:250px;
padding-top:10px;
margin: 0 auto;
text-align:center;
}
#footer #contact {
width:400px;
margin:auto;
display:block;
background:white;
text-align:left;
}
#footer #contact textarea {
width:250px;
resize:none;
}
#footer #contact input {
width:250px;
margin: 5px 0;
}
#footer #contact input[type="submit"] {
width:100px;
cursor:pointer;
}
<body>
<div id="footer">
<div id="contact">
<ul><li>Vragen? Stuur ons gerust een email.</li><li><button type="button" onclick="myFunction()">Click Me!</button></li></ul>
<div id="hidden">
<ul><li><input type="text" name="naam" id="naam" /></li><li><input type="text" name="email" id="email" /></li><li><textarea name="condolatie" id="condolatie" cols="45" rows="5"></textarea></li><li><input type="submit" name="submit" id="submit" value="Verzend" /></li></ul></div>
</div>
</div>
</body>